-
Notifications
You must be signed in to change notification settings - Fork 14
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
Support selecting cards based on card name #6
Comments
I agree that this would be a big improvement, but I don't immediately see a way to implement it using the current pyalsaudio API:
If anyone has suggestions how to implement this using the current pyalsaaudio API, I'm all ears. |
@jodal could you add an option which uses the currently selected audio device? For example, on my raspberry pi zero w I do have Analog, HDMI and the connected bluetooth speakers. Now I selected the speakers to be the default output. Would be nice to automatically output to the current audio device. |
Taking a look at this. Not sure if @jodal's comments from 2017 are still valid or not. If I can enumerate properties of audio devices using PyAlsaAudio, we can probably map name to id. |
just a quick comment, setting up my dev environment to work on this I noticed that we're depending on Gi, which requires Gtk and Cairo and a bunch of other high level libraries that might not be applicable on a headless environment. It looks like we're only using it for the GstAudio.StreamVolume.convert_volume() method. Has anyone looked at using one of the numeric libraries (e.g., numpy) for doing the equivalent without the big overhead? Happy to file a follow-up issue to do that conversion. edit: looks even simpler than something we'd need numpy for. |
just an update, I have looked at this, and my initial thoughts were to just pull alsaaudio.cards() and do a lookup, but as stated above,
I think the real fix for this would be to implement an "allcards" method in alsaaudio, which, well, doesn't really apply to this issue. edit: from the alsaaudio docs,
I did manage to get my environment setup for Mopidy development though, so hey, that's something. :) |
Numeric indexing of cards is sometimes hard to get persistent across reboots. Please also allow to use card names instead of the index for selecting the device to change.
The text was updated successfully, but these errors were encountered: