From be89dad344a77371ac7657380f71ffcd677b164d Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 12 Feb 2010 16:59:34 +0000 Subject: [PATCH] Fixed channel swizzling for ALSA target with 6-channel output. Fixes Bugzilla #942. --- src/audio/alsa/SDL_alsa_audio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/audio/alsa/SDL_alsa_audio.c b/src/audio/alsa/SDL_alsa_audio.c index e3ce98528..6a54192be 100644 --- a/src/audio/alsa/SDL_alsa_audio.c +++ b/src/audio/alsa/SDL_alsa_audio.c @@ -264,9 +264,8 @@ static void ALSA_WaitAudio(_THIS) */ #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; \