[Solved] - How can I tell Qt5 to use Alsa instead of PulseAudio?
-
Hi!
I have a situation where Qt5 keeps trying to use PulseAudio when we want it to try to use Alsa first.
Alsa is supported in the Qt build but Qt keeps trying to use Pulse and then not playing any sound when that doesn't work.We found that we can remove libqtmedia_pulse.so and then it will work and play sound but that's not a good solution.
We also don't want to exclude Pulse from the Qt build as some people might be using it.
How should we convince Qt to use Alsa instead?
UPDATE: I solved this by iterating though the available devices and looking for the one I knew should work.
I'm thinking we could add a popup menu with some of the available devices and the user can change to PulseAudio if they want.Cheers
Fred -
@RedMarsBlueMoon How do you iterate through the available devices? Could you give a code snippet? We use QtQuick and use the Audio component to play audio. So nowhere in the code do we get a list of audio devices or iterate through them.