I am running my qt4.8 gui (which uses QAudioOutput to play a .wav) on two types of workstations.
1. A windows computer via Oracle VM VirtualBox Redhat- linux
2. A Linux computer via VMware workstation- linux
When I run gui on windows VB the gui plays audio just fine and prints no errors. When I (try to) play on VMWare the app hangs in limbo and I get the following error:
Raw audio format not supported by backend, cannot play audio.
Using null output device, none available
I throw the Raw audio format error when defaultOutputDevice is not supported. The null output device error is generated from qt code.
When I add the following code:
foreach (const QAudioDeviceInfo &deviceInfo,
qDebug() << "Device name: " << deviceInfo.deviceName();
On VirtualBox I get:
Device name: “default:CARD=I82801AAICH”
Device name: “sysdefault:CARD=I82801AAICH”
Device name: “default”
On VMWare it doesn’t print any available devices.
when I run command lspci|grep -i audio
on VirtualBox i get:
multimedia audio controller:Intel corporation 82801AA AC'97 (rev 01)
on VMWare i get:
VMWare HD Audio Controller (rev 09)
Also I can use the play command on both workstations from command line and the wav file plays. Aditionally I do not currently have aplay rpms installed for troubleshooting. I also checked .vmx file for audio setup and it matches VMWare recomendations. I would also mention I am using pulseaudio version 6 on virtualBox and 10 on VMWare, but I wouldnt think this is the problem.
Any idea what could be causing this error to hit on VMWare redhat workstation, and anything else I can look into to troubleshoot? Is this a library or compatability issue?
code that I use to set up device:
//set bytes to buffer
//set expected wav format
foreach (const QAudioDeviceInfo &deviceInfo, QAudioDeviceInfo::availableDevices(QAudio::AudioOutput))
qDebug() << " Device name: " << deviceInfo.deviceName();
qWarning()<<"raw audio format not supported by backend, cannot play audio.";
audioOutput = new QAudioOutput(format,this);