From ca5836cdf460644aadf5ef24706653f08ef46450 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 27 Jul 2020 16:22:17 +0200 Subject: [PATCH] alsa: fix delay parameter We need to keep twice the delay of samples around. Fixes capture with resampling. --- spa/plugins/alsa/alsa-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c index e0c8969b0..7b0f90cda 100644 --- a/spa/plugins/alsa/alsa-pcm.c +++ b/spa/plugins/alsa/alsa-pcm.c @@ -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.