testing for alsa device

Nicolas Dufresne nicolas at ndufresne.ca
Tue Mar 26 19:28:51 UTC 2019


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:
>  https://github.com/CarlFK/voctomix-outcasts/blob/master/ingest.py#L216
> 
> 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 listgstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190326/b6c06f61/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190326/b6c06f61/attachment.sig>


More information about the gstreamer-devel mailing list