testing for alsa device

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

testing for alsa device

Carl Karsten-2
How should my python code test to see if "hw:1,0" is a valid alsa device?
source if it matters.

or whatever string gets passed to my app:

The plan is if it fails the test, fall back to audiotestsrc


--
Carl K

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: testing for alsa device

Nicolas Dufresne-5
Le mardi 26 mars 2019 à 13:08 -0500, Carl Karsten a écrit :
How should my python code test to see if "hw:1,0" is a valid alsa device?
source if it matters.

or whatever string gets passed to my app:

The plan is if it fails the test, fall back to audiotestsrc

You could simply set alsasrc, configured with that device string, to READY state and check the return value. It will fail synchronously if the device does not exist. For device enumeration, there is GstDeviceMonitor, but there is no alsa provider yet, contribution welcome.



_______________________________________________
gstreamer-devel mailing list
[hidden email]

https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (201 bytes) Download Attachment