src/audio/alsa/SDL_alsa_audio.c
branchSDL-1.2
changeset 4402 ed7b8e3520b5
parent 4365 d91a8026e0aa
child 5621 8b2b7f4009e5
equal deleted inserted replaced
4401:1a7b62893c9d 4402:ed7b8e3520b5
   262  * "For Linux ALSA, this is FL-FR-RL-RR-C-LFE
   262  * "For Linux ALSA, this is FL-FR-RL-RR-C-LFE
   263  *  and for Windows DirectX [and CoreAudio], this is FL-FR-C-LFE-RL-RR"
   263  *  and for Windows DirectX [and CoreAudio], this is FL-FR-C-LFE-RL-RR"
   264  */
   264  */
   265 #define SWIZ6(T) \
   265 #define SWIZ6(T) \
   266     T *ptr = (T *) mixbuf; \
   266     T *ptr = (T *) mixbuf; \
   267     const Uint32 count = (this->spec.samples / 6); \
       
   268     Uint32 i; \
   267     Uint32 i; \
   269     for (i = 0; i < count; i++, ptr += 6) { \
   268     for (i = 0; i < this->spec.samples; i++, ptr += 6) { \
   270         T tmp; \
   269         T tmp; \
   271         tmp = ptr[2]; ptr[2] = ptr[4]; ptr[4] = tmp; \
   270         tmp = ptr[2]; ptr[2] = ptr[4]; ptr[4] = tmp; \
   272         tmp = ptr[3]; ptr[3] = ptr[5]; ptr[5] = tmp; \
   271         tmp = ptr[3]; ptr[3] = ptr[5]; ptr[5] = tmp; \
   273     }
   272     }
   274 
   273