pulseaudio/src
Georg Chini da539ed336 sink-input: Implement resampler pseudo rewinding
This patch uses the two previous patches to implemnt pseudo-rewinding for the
resamplers by feeding some old data into the resampler after a reset. This is
necessary because PA is using external resamplers that do not implement
rewinding.

To get exactly the same output data from the resampler after a rewind if possible,
the matching period is calculated. This is the number of input samples that produces
an integral number of output samples. After the matching period, the resampler state
repeats. If the matching period is not too large, feeding history into the resampler
will start at a point that is a multiple of the matching period back in time. Then
the resampler will produce exactly the same samples.

The PA_RESAMPLER_MAX_HISTORY value has been replaced by PA_RESAMPLER_MAX_DELAY_USEC
and the required number of history samples is calculated from the sink input sample
rate. The number of history samples can be as large as about 12500.

This fixes glitches during volume changes when the sink runs on a rate different
from the sink input rate.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/120>
2021-11-03 18:37:31 +00:00
..
daemon daemon/cmdline: Invert log-level list to match numerical values 2021-10-20 17:16:21 +02:00
modules null-sink: Recalculate max_request and max_rewind while resuming sink 2021-11-03 15:59:22 +00:00
pulse thread-mainloop: Release once_unlocked_data object after callback 2021-10-06 14:18:24 +00:00
pulsecore sink-input: Implement resampler pseudo rewinding 2021-11-03 18:37:31 +00:00
tests Fix pointer to integer cast warnings 2021-09-22 14:43:59 +00:00
utils pactl: add format flag for JSON output 2021-08-11 15:31:05 +00:00
.gitignore buildsys/autotools: add pulseaudio-x11.service.in 2021-03-01 15:25:09 +00:00
depmod.py update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
meson.build socket-server: Move systemd socket activation code to pulsecore 2021-09-27 01:34:42 +00:00