<br><br><div class="gmail_quote">On Sat, Jun 2, 2012 at 2:16 AM, Ajay Garg <span dir="ltr"><<a href="mailto:ajaygargnsit@gmail.com" target="_blank">ajaygargnsit@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all.<br>
<br>
I have actually two questions ::<br>
<br>
a)<br>
How can one get the know the sound-device name used by a particular sound-driver?<br>
<br>
For eg., there are multiple entries in "/dev/snd" "virtual" filesystem
on my machine; however, I am not sure as to which device-file is used by
which driver?<br>
<br>
I guess, there would be a way to do this via gstreamer-api; however, I
am not sure. Doing it via a shell-script would be awesome <img alt="" title="Smilie" border="0"><br>
<br>
<br>
<br>
b)<br>
Secondly, (more importantly), how can one "programmatically" find out as to which sound-device is functional?<br>
<br>
I will take an example here ::<br>
<br>
When I try "gst-launch filesrc location=/path/to/mp3 ! mad ! pulsesink",
I am able to play the mp3 fine on one machine, but not on another, <b>even though doing "pulseaudio --check" on both machines, gives "0" as the exit status.</b><br>
<br>
<br>
<br>
<br>
So, in summary, I would like to know as to which all sound-device(s) is(are) functional, and then accordingly use the <b>corresponding</b> sound-driver(s) in my application.<br></blockquote><div><br></div><div>If you're writing an application, the most you can do is either use the default sink, or allow the user to select a device from a dropdown list. Don't try to be "smart" and choose what you think is a working device for the user. 99% of the time you'll be wrong.</div>
<div><br></div><div>Also, /dev/snd/* devices are from ALSA, and have nothing to do with pulseaudio. Don't correlate one with the other; it can't be done. If you're supporting PulseAudio API, don't look at /dev/snd.</div>
<div><br></div><div>As a matter of fact, don't look at /dev/snd at all. Just ignore it like it isn't there. Just read this and understand it: <a href="http://0pointer.de/blog/projects/guide-to-sound-apis.html">http://0pointer.de/blog/projects/guide-to-sound-apis.html</a></div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<br>
Will be grateful for a reply.<br>
<br>
<br>
<br>
Thanks and Regards,<br>
Ajay
<br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br>