changeset 4402:ed7b8e3520b5 SDL-1.2

Fixed channel swizzling for ALSA target with 6-channel output. Fixes Bugzilla #942.
author Ryan C. Gordon <icculus@icculus.org>
date Fri, 12 Feb 2010 16:59:34 +0000
parents 1a7b62893c9d
children 7c7d71a7d9fa
files src/audio/alsa/SDL_alsa_audio.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/audio/alsa/SDL_alsa_audio.c	Fri Feb 05 19:20:49 2010 +0000
+++ b/src/audio/alsa/SDL_alsa_audio.c	Fri Feb 12 16:59:34 2010 +0000
@@ -264,9 +264,8 @@
  */
 #define SWIZ6(T) \
     T *ptr = (T *) 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; \