Merged r5549:5550 from branches/SDL-1.2: ALSA 6-channel swizzle fix.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 12 Feb 2010 17:14:41 +0000
changeset 37049bc9ff36eb8f
parent 3703 df65ae8f32e8
child 3705 794f31fb9505
Merged r5549:5550 from branches/SDL-1.2: ALSA 6-channel swizzle fix.
src/audio/alsa/SDL_alsa_audio.c
     1.1 --- a/src/audio/alsa/SDL_alsa_audio.c	Fri Feb 05 19:23:59 2010 +0000
     1.2 +++ b/src/audio/alsa/SDL_alsa_audio.c	Fri Feb 12 17:14:41 2010 +0000
     1.3 @@ -234,9 +234,8 @@
     1.4   */
     1.5  #define SWIZ6(T) \
     1.6      T *ptr = (T *) this->hidden->mixbuf; \
     1.7 -    const Uint32 count = (this->spec.samples / 6); \
     1.8      Uint32 i; \
     1.9 -    for (i = 0; i < count; i++, ptr += 6) { \
    1.10 +    for (i = 0; i < this->spec.samples; i++, ptr += 6) { \
    1.11          T tmp; \
    1.12          tmp = ptr[2]; ptr[2] = ptr[4]; ptr[4] = tmp; \
    1.13          tmp = ptr[3]; ptr[3] = ptr[5]; ptr[5] = tmp; \