alsa: fix delay parameter

We need to keep twice the delay of samples around. Fixes capture
with resampling.
This commit is contained in:
Wim Taymans 2020-07-27 16:22:17 +02:00
parent 8f3771a56c
commit ca5836cdf4

View file

@ -689,7 +689,7 @@ static int get_status(struct state *state, snd_pcm_uframes_t *delay, snd_pcm_ufr
*target = state->last_threshold;
if (state->resample && state->rate_match) {
state->delay = state->rate_match->delay;
state->delay = state->rate_match->delay * 2;
state->read_size = state->rate_match->size;
/* We try to compensate for the latency introduced by rate matching
* by moving a little closer to the device read/write pointers.