<html><head></head><body><div class="ydpe12f06a2yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div><div><br></div><div dir="ltr" data-setdir="false">Here is documentation for <br><a href="https://gstreamer.freedesktop.org/documentation/audio/gstaudioaggregator.html?gi-language=c" rel="nofollow" target="_blank">https://gstreamer.freedesktop.org/documentation/audio/gstaudioaggregator.html?gi-language=c</a><br></div><div class="ydpe12f06a2signature"><div><br></div><div dir="ltr" data-setdir="false">Refer mixer code for more details:<br><a href="https://github.com/GStreamer/gst-plugins-base/blob/master/gst/audiomixer/gstaudiomixer.c" rel="nofollow" target="_blank">https://github.com/GStreamer/gst-plugins-base/blob/master/gst/audiomixer/gstaudiomixer.c</a><br><br></div><div>Sent from Yahoo Mail. <a href="https://yho.com/148vdq" rel="nofollow" target="_blank">Get the app</a></div></div></div>
<div><br></div><div><br></div>
</div><div id="yahoo_quoted_8979971547" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Tuesday, 7 March, 2023 at 12:43:59 am GMT-6, Sergei Hrushev via gstreamer-devel <gstreamer-devel@lists.freedesktop.org> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="yiv4458469017"><div dir="ltr"><div>Hello everyone!</div><div><br></div><div>I have a question on usage of GstAudioAggregator: tried to search docs, StackOverflow etc. - but no luck.</div><div><br></div><div>I'm trying to implement a Spatial Audio mixing logic based on
GstAudioAggregator. <br></div><div>My basic idea is simple enough: </div><div><br></div><div>1. Capture samples from 'sink_%u' pads of
GstAudioAggregator;</div><div>2. Put the samples captured at step 1 into the Spatial Audio library;</div><div>3. Get the mixed result from Spatial Audio library
and transfer it to 'src' pad
of
GstAudioAggregator.</div><div><br></div><div>For Step 1 I created a
descendant of GstAudioAggregator where parts of buffers are collected
with correct reordering based on their offsets.</div><div>For steps 2
and 3 I added a probe of type GST_PAD_PROBE_TYPE_BUFFER to 'src' pad of
my Element, made the buffer writable in the callback, <br></div><div>then I transfer the data to Spatial Audio library and receive result.<br></div><div></div><div>But when I'm writing data to the output buffer the resulting sound is always "jammed".</div><div><br></div><div></div><div>I even tried to generate 100Hz sine wave and wrote it directly to output buffer, and the result is always jammed too. <br></div><div>To not miss something I carefully checked the output buffer offsets received at _aggregate_one_buffer, <br></div><div>so
for each pad I see that it starts from zero, but when I write frames
starting at the output buffer's first address - the resulting sound is
always "jammed".</div><div>Of course I checked frame rate, number of channels and audio format: all values are correct.<br></div><div><br></div><div>Is there any example of how to write frames from probe to the 'src' of
GstAudioAggregator (of any 'src' in general if the problem in my misunderstanding of the idea)?</div><div>How is possible to write to the output buffer manually?<br></div><div><br></div><div>Best regards, Sergei Hrushev. </div></div>
</div></div>
</div>
</div></body></html>