From 78f97108f9dad22db6708f28322561eb9828fc36 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sat, 5 Nov 2022 10:38:33 -0400 Subject: [PATCH] audio: Avoid accumulation errors in resampler. Fixes #6391. --- src/audio/SDL_audiocvt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audio/SDL_audiocvt.c b/src/audio/SDL_audiocvt.c index e79437e91..0884fa373 100644 --- a/src/audio/SDL_audiocvt.c +++ b/src/audio/SDL_audiocvt.c @@ -247,7 +247,7 @@ SDL_ResampleAudio(const int chans, const int inrate, const int outrate, *(dst++) = outsample; } - outtime += outtimeincr; + outtime = outtimeincr * i; } return outframes * chans * sizeof (float);