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
|
@ -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…
Reference in New Issue