On Tue, May 17, 2011 at 5:26 AM, W. Michael Petullo <span dir="ltr">&lt;<a href="mailto:mike@flyn.org">mike@flyn.org</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I am having trouble understanding GstRingBuffer&#39;s latency_time,<br>
buffer_time, segsize and segtotal records. I&#39;ve read the object&#39;s<br>
documentation and looked at alsasink.c. I am looking at this in the<br>
context of working on apexsink.<br></blockquote><div>[...] </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Another thing that I have observed is that audio does not stream properly<br>
unless I set segtotal &gt; 1. Setting this value to 2 ensures that the<br>
stream plays. Again, I am interested in finding a good place to read<br>
about the interaction of these four values.<br></blockquote><div> </div><div>Did you notice the inline comments in the GstRingBufferSpec structure? You can find those here:</div><div>    <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstringbuffer.html#GstRingBufferSpec">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstringbuffer.html#GstRingBufferSpec</a></div>
</div><div><br></div><div>I&#39;m a bit surprised that segtotal = 1 doesn&#39;t produce a warning or error. The smallest meaningful ring buffer configuration is with two segments, where one can be in use by the writer (upstream) and the other one by the reader (consumer).</div>
<div><br></div><div>I&#39;m not sure about apex, but I have the feeling it might make more sense to look at pulsesink instead of alsasink for reference.</div><br>-- <br>René<br>