<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">Le 3 mars 2018 10:27, "Charlie Laub" <<a href="mailto:charleslaub@sbcglobal.net">charleslaub@sbcglobal.net</a>> a écrit :<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="#0563C1" vlink="#954F72"><div class="m_3605935929418008737WordSection1"><p class="MsoNormal">I am doing some testing with gst-launch (Gstreamer v1.10.4). It’s a simple pipeline that does the following: <u></u><u></u></p><p class="MsoNormal">Another application sends audio to the ALSA loopback device<u></u><u></u></p><p class="MsoNormal">Gstreamer uses the output of the loopback as input<u></u><u></u></p><p class="MsoNormal">The pipeline sends the audio an ALSA sink, a DAC, so I can monitor the audio<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">The pipeline is:<u></u><u></u></p><p class="MsoNormal">gst-launch-1.0 -vm alsasrc device=’hw:CARD=Loopback,DEV=<wbr>1’ ! queue ! audioconvert ! audio/x-raw,channels=2,format=<wbr>S16LE,rate=48000 ! alsasink device=’hw:CARD=PCH,DEV=0’<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">This works perfectly, but:<u></u><u></u></p><p class="MsoNormal">When I replace “hw” with “dsnoop” in the alsasrc the audio is either stuttering, or stops after a fraction of a second.</p></div></div></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Just like most alsa plugin, dsnoop does not broadcast the extra latency it is adding. As a side effect, all samples are submitted late and are dropped. Disabling the sync turns GST into a dummy audio filler. There is various settings you can play with that will improve this situation, have a look at latency and buffer-time on alsasrc/sink.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="#0563C1" vlink="#954F72"><div class="m_3605935929418008737WordSection1"><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">No errors are produced (that I can see with -vm). <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">For those who are not familiar with it, dsnoop is an ALSA output device that permits multiple “listeners” to connect to it. I use dsnoop so I can connect multiple gstreamer pipelines to an audio stream generated by another application that sends its output to the ALSA loopback.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I find this very strange because I have been using (for more than a year) a complicated pipeline that takes the EXACT same audio via dsnoop as the input to the pipeline, but then streams it via RTP/UDP. I never encountered a problem with that application, it’s only with the simple pipeline I show above that I am experiencing this problem. <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Later I found this thread:<u></u><u></u></p><p class="MsoNormal"><a href="https://e2e.ti.com/support/embedded/linux/f/354/p/569574/2087898" target="_blank">https://e2e.ti.com/support/<wbr>embedded/linux/f/354/p/569574/<wbr>2087898</a><u></u><u></u></p><p class="MsoNormal">Near the bottom there is a post dated <span class="m_3605935929418008737attribute-value"><a href="https://e2e.ti.com/support/embedded/linux/f/354/p/569574/2087957#2087957" target="_blank">Jan 24, 2017 12:22 PM</a>. The user could only get his similar short alsasrc</span><span class="m_3605935929418008737attribute-value"><span style="font-family:Wingdings">à</span>alsasink pipeline working if sync=false was set on the sink. I tried this and it worked! The pipeline with dsnoop now plays without error and audio is perfect.<u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Why does adding sync=false fix the problem? <u></u><u></u></p><p class="MsoNormal">In general, when should I set sync=false on an alsasink?<u></u><u></u></p></div></div><br>______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-<wbr>devel</a><br>
<br></blockquote></div><br></div></div></div>