<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le sam. 17 oct. 2020 17 h 30,  <<a href="mailto:charleslaub@sbcglobal.net">charleslaub@sbcglobal.net</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Nicolas, this is the message/thread on adaptive resampling that I mentioned.<br>
-Charlie<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I see, so he was proposing a new version of the callback, that would let app implement their own. To preserve API, this would simply imply adding a second callback. Certainly straight forward, but I think the approach does not cover your (and my) concern about having something to Open Source directly available.</div><div dir="auto"><br></div><div dir="auto">I'd rather suggest looking into replacing the resampling code in the sink, using GStreamer resampler or an external one, that is up to the author really. Such contribution will be very welcome, it would with a decent cpu allow easy and professional synchronized playback by anyone.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
-----Original Message-----<br>
From: gstreamer-devel <<a href="mailto:gstreamer-devel-bounces@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel-bounces@lists.freedesktop.org</a>> On<br>
Behalf Of Pavel Hofman<br>
Sent: Wednesday, October 14, 2020 4:12 AM<br>
To: <a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
Subject: Adaptive resampling in gstaudiobasesink.c<br>
<br>
Hi,<br>
<br>
Please do I understand correctly that the slave clock alignment methods in<br>
gstaudiobasesink.c never touch the actual samples and handle only various<br>
ways of adjusting pointers into the ringbuffer? Including the<br>
GST_AUDIO_BASE_SINK_SLAVE_CUSTOM method.<br>
<br>
Calculation of the master/slave clock difference is already available in<br>
gstaudiobasesink.c. Adaptive resampling (like used in PA, alsaloop,<br>
etc.) would require having two buffers with input and resampled samples: <br>
in -> resampling -> out. If the out buffer were available, calling e.g. <br>
src_process of libsamplerate would not be so difficult, IMO.<br>
<br>
Please how complicated would be to add the out buffer and let the<br>
implementations for specific audio outputs (e.g. GstAlsaSink) use it instead<br>
of the buffer with incoming data? I am afraid it is not trivial due to the<br>
"inheritance" within the code<br>
<br>
struct _GstAlsaSink {<br>
   GstAudioSink    sink;<br>
..<br>
<br>
} .<br>
<br>
Perhaps the ring buffer would become the "out" buffer and the resampling<br>
code had to read from another buffer written by the "input" side of the<br>
plugin.<br>
<br>
Thanks a lot for any suggestions and comments.<br>
<br>
Best regards,<br>
<br>
Pavel.<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div></div></div>