I have a small C++ Qt program that uses a QAudioOutput instance to emit sound. It compiles & runs fine using Qt 4.8.5.
However, in Qt 5.0, 5.1, and 5.2, my application compiles, but does not work. I get the following error message while the constructor of the QAudioOutput instance is running:
Unable to create a connection to the pulseaudio context.
Also, the constructor does not return, so my program hangs.
I do not have pulseaudio running. ALSA is working fine, and this is what my program uses when compiled with Qt 4.8.5.
Inspecting the Qt5 “plugins/audio” directory, there is only “libqtmedia_pulse.so” there, the name of which suggests that it depends on pulseaudio.
My questions:
- Is there still a backend for output to ALSA (without pulseaudio) in Qt 5+ ?
- If yes, how do I make sure it is built? I do not see any configure options for that.
- It appears to be a bug that the constructor of QAudioOutput hangs my app. Where can I report that?