<html dir="ltr"><head></head><body style="text-align:left; direction:ltr;"><div>On Thu, 2020-11-12 at 12:03 +0200, Sebastian Dröge wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div>On Thu, 2020-11-12 at 20:44 +1100, Matthew Waters wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><br><pre>No, the buffer size is not a direct relation with the sample rate of the </pre><pre>audio.  There can be any number of samples within an audio buffer that </pre><pre>still have the same sample rate.</pre><br><pre>It sounds like you probably want to base your element on </pre><pre>GstAudioAggregator though for the audio-specifics.</pre></blockquote><br><div>Or alternatively you could make use of <font face="monospace" size="3">GstAdapter</font> for converting the input buffers with arbitrary number of samples into equally-sized buffers.</div><div><br></div><div>However <font face="monospace" size="3">GstAudioAggregator</font> also takes care of inter-stream synchronization and various other things that are not too easy to reimplement, so if you need that it would be a better idea to use it instead.</div></blockquote><div><span><pre><br></pre><div>And I forgot to add that when using <font face="monospace" size="3">GstAudioAggregator</font> you should not override <font face="monospace" size="3">GstAggregator::aggregate()</font> but instead <font face="monospace" size="3">GstAudioAggregator::create_output_buffer()</font> and <font face="monospace" size="3">GstAudioAggregator::aggregate_one_buffer()</font>.</div><div><br></div><div>If you override the former then all the processing logic of <font face="monospace" size="3">GstAudioAggregator</font> is disabled.</div><pre><br></pre><pre>-- <br></pre><div style="width: 71ch;">Sebastian Dröge, Centricular Ltd · <a href="http://www.centricular.com">https://www.centricular.com</a></div><div style="width: 71ch;"><br></div></span></div></body></html>