<br><br><div class="gmail_quote">On Sat, Jun 2, 2012 at 2:16 AM, Ajay Garg <span dir="ltr">&lt;<a href="mailto:ajaygargnsit@gmail.com" target="_blank">ajaygargnsit@gmail.com</a>&gt;</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 &quot;/dev/snd&quot; &quot;virtual&quot; 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 &quot;programmatically&quot; find out as to which sound-device is functional?<br>
<br>
I will take an example here ::<br>
<br>
When I try &quot;gst-launch filesrc location=/path/to/mp3 ! mad ! pulsesink&quot;,
 I am able to play the mp3 fine on one machine, but not on another, <b>even though doing &quot;pulseaudio --check&quot; on both machines, gives &quot;0&quot; 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&#39;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&#39;t try to be &quot;smart&quot; and choose what you think is a working device for the user. 99% of the time you&#39;ll be wrong.</div>
<div><br></div><div>Also, /dev/snd/* devices are from ALSA, and have nothing to do with pulseaudio. Don&#39;t correlate one with the other; it can&#39;t be done. If you&#39;re supporting PulseAudio API, don&#39;t look at /dev/snd.</div>
<div><br></div><div>As a matter of fact, don&#39;t look at /dev/snd at all. Just ignore it like it isn&#39;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>