From 366c77a9f04a5c4eb57e41092f88f134688480c5 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 18 Dec 2016 20:17:33 -0500 Subject: [PATCH] audio: fixed one more incorrectly-hardcoded value in the resamplers. --- src/audio/SDL_audiotypecvt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/audio/SDL_audiotypecvt.c b/src/audio/SDL_audiotypecvt.c index cddcda8e697f4..2a585000a5e03 100644 --- a/src/audio/SDL_audiotypecvt.c +++ b/src/audio/SDL_audiotypecvt.c @@ -283,11 +283,11 @@ SDL_Downsample_Arbitrary(SDL_AudioCVT *cvt, const int channels) SDL_memcpy(last_sample, src, cpy); while (dst < target) { - src += 8; + src += channels; eps += dstsize; if ((eps << 1) >= srcsize) { SDL_memcpy(dst, sample, cpy); - dst += 8; + dst += channels; for (i = 0; i < channels; i++) { sample[i] = (float) ((((double) src[i]) + ((double) last_sample[i])) * 0.5); }