comparison 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
comparison
equal deleted inserted replaced
3703:df65ae8f32e8 3704:9bc9ff36eb8f
232 * "For Linux ALSA, this is FL-FR-RL-RR-C-LFE 232 * "For Linux ALSA, this is FL-FR-RL-RR-C-LFE
233 * and for Windows DirectX [and CoreAudio], this is FL-FR-C-LFE-RL-RR" 233 * and for Windows DirectX [and CoreAudio], this is FL-FR-C-LFE-RL-RR"
234 */ 234 */
235 #define SWIZ6(T) \ 235 #define SWIZ6(T) \
236 T *ptr = (T *) this->hidden->mixbuf; \ 236 T *ptr = (T *) this->hidden->mixbuf; \
237 const Uint32 count = (this->spec.samples / 6); \
238 Uint32 i; \ 237 Uint32 i; \
239 for (i = 0; i < count; i++, ptr += 6) { \ 238 for (i = 0; i < this->spec.samples; i++, ptr += 6) { \
240 T tmp; \ 239 T tmp; \
241 tmp = ptr[2]; ptr[2] = ptr[4]; ptr[4] = tmp; \ 240 tmp = ptr[2]; ptr[2] = ptr[4]; ptr[4] = tmp; \
242 tmp = ptr[3]; ptr[3] = ptr[5]; ptr[5] = tmp; \ 241 tmp = ptr[3]; ptr[3] = ptr[5]; ptr[5] = tmp; \
243 } 242 }
244 243