mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
audio-src: queued only requested frames
Use the new requested buffer field to only queue the amount of samples required by the resampler for the current quantum. This avoid spikes when the maxsize block of samples is processed. Fixes #2353
This commit is contained in:
parent
6a8bdf1bfe
commit
777a8c687b
1 changed files with 1 additions and 1 deletions
|
|
@ -93,7 +93,7 @@ static void on_process(void *userdata)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
stride = sizeof(float) * DEFAULT_CHANNELS;
|
stride = sizeof(float) * DEFAULT_CHANNELS;
|
||||||
n_frames = buf->datas[0].maxsize / stride;
|
n_frames = SPA_MIN(b->requested, buf->datas[0].maxsize / stride);
|
||||||
|
|
||||||
fill_f32(data, p, n_frames);
|
fill_f32(data, p, n_frames);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue