Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selectabled audio devices #116

Open
nottledim opened this issue Aug 14, 2017 · 6 comments
Open

Selectabled audio devices #116

nottledim opened this issue Aug 14, 2017 · 6 comments

Comments

@nottledim
Copy link

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.

@AlbrechtL AlbrechtL changed the title Changes pulse audio channel settings [Linux] Changes pulse audio channel settings Aug 15, 2017
@AlbrechtL
Copy link
Owner

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

@coldcoff
Copy link

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).

@AlbrechtL
Copy link
Owner

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

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

@AlbrechtL AlbrechtL reopened this Nov 24, 2019
@AlbrechtL
Copy link
Owner

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 AlbrechtL changed the title [Linux] Changes pulse audio channel settings Selectabled audio devices Dec 16, 2022
@AlbrechtL
Copy link
Owner

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

@coldcoff
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants