sink-input: Add history memblockq

System Internals / PulseAudio - Georg Chini [chini.tk] - 3 November 2021 18:37 UTC

A new memblockq is added to the sink input code to keep some history of the input data. The queue is kept in sync with the render memblockq. The old input data will be used to prepare the resampler after a rewind.

pa_resampler_request() and pa_resampler_result() have been changed to round as good as possible to avoid loosing or duplicating samples during rewinds.

Part-of:

1bfabd651 sink-input: Add history memblockq
src/pulsecore/resampler.c | 78 +++++++++++++++++++++++++++++++-----------
src/pulsecore/resampler.h | 2 ++
src/pulsecore/sink-input.c | 84 +++++++++++++++++++++++++++++++++++++---------
src/pulsecore/sink-input.h | 4 +++
4 files changed, 134 insertions(+), 34 deletions(-)

Upstream: cgit.freedesktop.org


  • Share