Unsolved Distinguish ALSA and Pulseaudio devices with QAudioDeviceInfo
-
I'm porting an older Qt4 Application, i have written a few years ago to Qt5. As phonon was dropped, i want to use QtMultimedia.
I have two notification/alert sounds that should be played on a user definde audio device.
QAudioDeviceInfo::availableDevices(QAudio::AudioOutput)
gives me a full list of all found devices"sysdefault:CARD=SB" "pulse" "front:CARD=SB,DEV=0" "surround21:CARD=SB,DEV=0" "surround40:CARD=SB,DEV=0" "surround41:CARD=SB,DEV=0" "surround50:CARD=SB,DEV=0" "surround51:CARD=SB,DEV=0" "surround71:CARD=SB,DEV=0" "iec958:CARD=SB,DEV=0" "hdmi:CARD=NVidia,DEV=0" "hdmi:CARD=NVidia,DEV=1" "hdmi:CARD=NVidia,DEV=2" "default" "alsa_output.pci-0000_00_14.2.analog-surround-51" "alsa_output.pci-0000_01_00.1.hdmi-stereo"
A common user does not know which device is ALSA and wich is Pulseaudio, and will get really confused about the choices for audio output.
Is there any way to
- disable ALSA or Pulseaudio from the code
or - check if a device is alsa or pulseaudio
- disable ALSA or Pulseaudio from the code