diff src/audio/alsa/SDL_alsa_audio.c @ 3704:9bc9ff36eb8f

Merged r5549:5550 from branches/SDL-1.2: ALSA 6-channel swizzle fix.
author Ryan C. Gordon <icculus@icculus.org>
date Fri, 12 Feb 2010 17:14:41 +0000
parents 4160ba33b597
children b530ef003506
line wrap: on
line diff
--- a/src/audio/alsa/SDL_alsa_audio.c	Fri Feb 05 19:23:59 2010 +0000
+++ b/src/audio/alsa/SDL_alsa_audio.c	Fri Feb 12 17:14:41 2010 +0000
@@ -234,9 +234,8 @@
  */
 #define SWIZ6(T) \
     T *ptr = (T *) this->hidden->mixbuf; \
-    const Uint32 count = (this->spec.samples / 6); \
     Uint32 i; \
-    for (i = 0; i < count; i++, ptr += 6) { \
+    for (i = 0; i < this->spec.samples; i++, ptr += 6) { \
         T tmp; \
         tmp = ptr[2]; ptr[2] = ptr[4]; ptr[4] = tmp; \
         tmp = ptr[3]; ptr[3] = ptr[5]; ptr[5] = tmp; \