From c4e3b5adbcb516b36207771b18e8a8da275a4b60 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sun, 14 Mar 2021 14:13:37 +0100 Subject: [PATCH] alsa: don't double the resampler delay The delay of the resampler is what it reports, don't double it. See #854 --- 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 90de03525..01e76393c 100644 --- a/spa/plugins/alsa/alsa-pcm.c +++ b/spa/plugins/alsa/alsa-pcm.c @@ -830,7 +830,7 @@ static int get_status(struct state *state, snd_pcm_uframes_t *delay, snd_pcm_ufr *target = state->threshold + state->headroom; if (state->resample && state->rate_match) { - state->delay = state->rate_match->delay * 2; + state->delay = state->rate_match->delay; 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. */