SDL: audio: Avoid accumulation errors in resampler.

From 78f97108f9dad22db6708f28322561eb9828fc36 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
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 e79437e91d97..0884fa373a32 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);