audio: fixed one more incorrectly-hardcoded value in the resamplers.
authorRyan C. Gordon
Sun, 18 Dec 2016 20:17:33 -0500
changeset 10711838b7f845f84
parent 10710 a6babd973955
child 10712 47a5366726c0
audio: fixed one more incorrectly-hardcoded value in the resamplers.
src/audio/SDL_audiotypecvt.c
     1.1 --- a/src/audio/SDL_audiotypecvt.c	Sun Dec 18 13:05:14 2016 -0400
     1.2 +++ b/src/audio/SDL_audiotypecvt.c	Sun Dec 18 20:17:33 2016 -0500
     1.3 @@ -283,11 +283,11 @@
     1.4      SDL_memcpy(last_sample, src, cpy);
     1.5  
     1.6      while (dst < target) {
     1.7 -        src += 8;
     1.8 +        src += channels;
     1.9          eps += dstsize;
    1.10          if ((eps << 1) >= srcsize) {
    1.11              SDL_memcpy(dst, sample, cpy);
    1.12 -            dst += 8;
    1.13 +            dst += channels;
    1.14              for (i = 0; i < channels; i++) {
    1.15                  sample[i] = (float) ((((double) src[i]) + ((double) last_sample[i])) * 0.5);
    1.16              }