Hi,<br><br>another late reply from my famous series, bte find my comment(s) below..<br><br><div class="gmail_quote">On Fri, May 20, 2011 at 7:21 PM, Pietro Battiston <span dir="ltr">&lt;<a href="mailto:me@pietrobattiston.it">me@pietrobattiston.it</a>&gt;</span> wrote:<br>
..snip..<br><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">4) am I missing something else (in the end, it&#39;s been few days since I<br>
first programmed with gstreamer)?<br>
<br></blockquote><div><br>latencies can come fro various places... how are you measuring it? (e.g. you have an oscilloscope connected to the speakers). As a note, you should check the overall latency in the whole pipeline, but most probably, if you&#39;re using pulseaudio, it&#39;s in pulsesink that you should focus (try tweaking buffer-time and latency-time, defaulting to about 10ms multiples).<br>
<br>Another influence factor is the size of the buffers wrt the sample rate you&#39;re using in the source element: obviously, the smaller buffers the lower latencies. audiotestsrc has default blocksize set to 4096, default sample rate set to 44100Hz, that is about 22 ms of latency. Combined with the default pulsesink latency of above, rounded up to the 10ms multiples, we&#39;ve pretty much the 30ms you&#39;ve been measuring.<br>
<br>Btw I doubt you&#39;ll ever be able to get latencies lower than a few multiples of 1/HZ (<a href="http://www.unix.com/linux/48694-kernel-how-modify-read-tick-rate-hz.html">http://www.unix.com/linux/48694-kernel-how-modify-read-tick-rate-hz.html</a>), especially if dealing with the CFS..<br>
<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Or more in general: do you suggest that gstreamer can do what I want or<br>
am I using the wrong tool?<br></blockquote><div><br>it depends on your target latency (see above), for sub-millisecond values one might even argue about the opportunity to use any non-realtime approaches ;)<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
While I&#39;m at it, another question: I searched for some element doing the<br>
inverse of &quot;tee&quot; for audio. I found a discussion on the argument:<br>
<a href="http://gstreamer-devel.966125.n4.nabble.com/aggregator-element-td973247.html" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/aggregator-element-td973247.html</a><br>
which however was dropped. Dan:<br>
<a href="http://gstreamer-devel.966125.n4.nabble.com/aggregator-element-td973247.html#a973254" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/aggregator-element-td973247.html#a973254</a><br>
proposed several &quot;interpretations&quot; of that request, and what I need is<br>
precisely the last: &quot;For audio-only mix the inputs to one output, like a<br>
multi-track studio mixer? &quot;. Is there such an element?<br>
<br></blockquote><div><br>here you go:<br><br><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-adder.html">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-adder.html</a><br>
<br>Regards <br></div></div>