audio: fixed one more incorrectly-hardcoded value in the resamplers.

This commit is contained in:
Ryan C. Gordon 2016-12-18 20:17:33 -05:00
parent eda74fda96
commit 366c77a9f0
1 changed files with 2 additions and 2 deletions

View File

@ -283,11 +283,11 @@ SDL_Downsample_Arbitrary(SDL_AudioCVT *cvt, const int channels)
SDL_memcpy(last_sample, src, cpy); SDL_memcpy(last_sample, src, cpy);
while (dst < target) { while (dst < target) {
src += 8; src += channels;
eps += dstsize; eps += dstsize;
if ((eps << 1) >= srcsize) { if ((eps << 1) >= srcsize) {
SDL_memcpy(dst, sample, cpy); SDL_memcpy(dst, sample, cpy);
dst += 8; dst += channels;
for (i = 0; i < channels; i++) { for (i = 0; i < channels; i++) {
sample[i] = (float) ((((double) src[i]) + ((double) last_sample[i])) * 0.5); sample[i] = (float) ((((double) src[i]) + ((double) last_sample[i])) * 0.5);
} }