From 8569cf2e76357f5ef3e408cb07c51f960f1aa494 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 12 Feb 2010 17:14:41 +0000 Subject: [PATCH] Merged r5549:5550 from branches/SDL-1.2: ALSA 6-channel swizzle fix. --- 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 614d92c86..f98290502 100644 --- a/src/audio/alsa/SDL_alsa_audio.c +++ b/src/audio/alsa/SDL_alsa_audio.c @@ -234,9 +234,8 @@ ALSA_WaitDevice(_THIS) */ #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; \