welle.io icon indicating copy to clipboard operation
welle.io copied to clipboard

Selectabled audio devices

Open nottledim opened this issue 7 years ago • 6 comments

On Debian linux whenever welle.io is started it creates a new pulse audio channel which means it always uses default settings. It also does the same when moving or resizing the window.

It seems to be setting to defaults when audio channel is opened.

nottledim avatar Aug 14 '17 14:08 nottledim

It is a limitation of QMultimedia and the pulse back-end. If somebody has a solution they can post it here.

AlbrechtL avatar Aug 15 '17 15:08 AlbrechtL

The QAudioOutput also allows to be constructed with a given QAudioDeviceInfo as target, see: https://doc.qt.io/qt-5/qaudiooutput.html and https://doc.qt.io/qt-5/qaudiodeviceinfo.html.

-> So you could maybe alternatively query the available devices and save an own default device in welle.io's preferences. Then the magically created stream name is irrelevant.

Would this be possible, please? I think it's quite common to for example point welle.io's sound to a headphone, instead of the default notebook device (which is the builtin speaker).

coldcoff avatar Nov 11 '19 08:11 coldcoff

Thanks for pointing this out! It is worth to try it.

If somebody can send a pull request this would be great!

AlbrechtL avatar Nov 24 '19 19:11 AlbrechtL

I looked into it. It is not as easy. In my case QAudioDeviceInfo gives me plenty of audio devices but I have only one connected. Also the names are quite strange. I don't think that these names are really helping of finding the correct audio output.

2019-11-26T20:15:33.717 Debug: Audio: Available sound output device:  "default"
2019-11-26T20:15:33.717 Debug: Audio: Available sound output device:  "jack"
2019-11-26T20:15:33.717 Debug: Audio: Available sound output device:  "pulse"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "sysdefault:CARD=PCH"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "front:CARD=PCH,DEV=0"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "surround21:CARD=PCH,DEV=0"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "surround40:CARD=PCH,DEV=0"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "surround41:CARD=PCH,DEV=0"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "surround50:CARD=PCH,DEV=0"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "surround51:CARD=PCH,DEV=0"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "surround71:CARD=PCH,DEV=0"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "dmix:CARD=PCH,DEV=0"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "dsnoop:CARD=PCH,DEV=0"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "hw:CARD=PCH,DEV=0"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "plughw:CARD=PCH,DEV=0"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "usbstream:CARD=PCH"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "hdmi:CARD=NVidia,DEV=0"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "hdmi:CARD=NVidia,DEV=1"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "hdmi:CARD=NVidia,DEV=2"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "hdmi:CARD=NVidia,DEV=3"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "dmix:CARD=NVidia,DEV=3"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "dmix:CARD=NVidia,DEV=7"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "dmix:CARD=NVidia,DEV=8"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "dmix:CARD=NVidia,DEV=9"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "dsnoop:CARD=NVidia,DEV=3"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "dsnoop:CARD=NVidia,DEV=7"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "dsnoop:CARD=NVidia,DEV=8"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "dsnoop:CARD=NVidia,DEV=9"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "hw:CARD=NVidia,DEV=3"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "hw:CARD=NVidia,DEV=7"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "hw:CARD=NVidia,DEV=8"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "hw:CARD=NVidia,DEV=9"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "plughw:CARD=NVidia,DEV=3"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "plughw:CARD=NVidia,DEV=7"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "plughw:CARD=NVidia,DEV=8"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "plughw:CARD=NVidia,DEV=9"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "usbstream:CARD=NVidia"
2019-11-26T20:15:33.718 Debug: Audio: Available sound output device:  "alsa_output.pci-0000_00_1b.0.analog-stereo" 

BTW: The missing API for setting the pulse name is documented here: https://bugreports.qt.io/browse/QTBUG-32842

AlbrechtL avatar Nov 26 '19 19:11 AlbrechtL

We should take a look into the new Qt6 multimedia classes.

AlbrechtL avatar Dec 16 '22 21:12 AlbrechtL

Yes, that would be a wonderful christmas present ;-)

coldcoff avatar Dec 19 '22 09:12 coldcoff