mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-28 07:00:13 -05:00
sink-input: Add history memblockq
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: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/120>
This commit is contained in:
parent
90ccfc1688
commit
1bfabd6512
4 changed files with 134 additions and 34 deletions
|
|
@ -252,6 +252,10 @@ struct pa_sink_input {
|
|||
/* We maintain a history of resampled audio data here. */
|
||||
pa_memblockq *render_memblockq;
|
||||
|
||||
/* This queue keeps the history before resampling and is used
|
||||
* when rewinding the resampler. */
|
||||
pa_memblockq *history_memblockq;
|
||||
|
||||
pa_sink_input *sync_prev, *sync_next;
|
||||
|
||||
/* The requested latency for the sink */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue