mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa: keep more headroom when rate matching
When we are rate matching, keep some more headroom to make sure we have enough data for the adaptive resampler. Fixes crackling when following the dummy node and probably also when following another capture device.
This commit is contained in:
parent
7e2dab876a
commit
8ffb74c8e2
1 changed files with 2 additions and 0 deletions
|
|
@ -1879,6 +1879,8 @@ static int get_status(struct state *state, uint64_t current_time,
|
|||
} else {
|
||||
*delay = avail;
|
||||
*target = SPA_MAX(*target, state->read_size);
|
||||
if (state->matching)
|
||||
*target += 32;
|
||||
}
|
||||
*target = SPA_CLAMP(*target, state->min_delay, state->buffer_frames);
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue