audio: Avoid accumulation errors in resampler. Fixes #6391.
diff --git a/src/audio/SDL_audiocvt.c b/src/audio/SDL_audiocvt.c
index e79437e..0884fa3 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);