Adaptive resampling in gstaudiobasesink.c
Pavel Hofman
pavel.hofman at ivitera.com
Wed Oct 14 08:12:00 UTC 2020
Hi,
Please do I understand correctly that the slave clock alignment methods
in gstaudiobasesink.c never touch the actual samples and handle only
various ways of adjusting pointers into the ringbuffer? Including the
GST_AUDIO_BASE_SINK_SLAVE_CUSTOM method.
Calculation of the master/slave clock difference is already available in
gstaudiobasesink.c. Adaptive resampling (like used in PA, alsaloop,
etc.) would require having two buffers with input and resampled samples:
in -> resampling -> out. If the out buffer were available, calling e.g.
src_process of libsamplerate would not be so difficult, IMO.
Please how complicated would be to add the out buffer and let the
implementations for specific audio outputs (e.g. GstAlsaSink) use it
instead of the buffer with incoming data? I am afraid it is not trivial
due to the "inheritance" within the code
struct _GstAlsaSink {
GstAudioSink sink;
...
} .
Perhaps the ring buffer would become the "out" buffer and the resampling
code had to read from another buffer written by the "input" side of the
plugin.
Thanks a lot for any suggestions and comments.
Best regards,
Pavel.
More information about the gstreamer-devel
mailing list