/* * Called right before feeding this->hidden->mixbuf to the hardware. Swizzle * channels from Windows/Mac order to the format alsalib will want. */ static SDL_INLINE void swizzle_alsa_channels(_THIS, void *buffer, Uint32 bufferlen) { if (this->spec.channels == 6) { switch (SDL_AUDIO_BITSIZE(this->spec.format)) { case 8: swizzle_alsa_channels_6_8bit(buffer, bufferlen); break; case 16: swizzle_alsa_channels_6_16bit(buffer, bufferlen); break; case 32: swizzle_alsa_channels_6_32bit(buffer, bufferlen); break; case 64: swizzle_alsa_channels_6_64bit(buffer, bufferlen); break; default: SDL_assert(!"unhandled bitsize"); break; } } /* !!! FIXME: update this for 7.1 if needed, later. */ }
/* * Called right before feeding this->mixbuf to the hardware. Swizzle channels * from Windows/Mac order to the format alsalib will want. */ static __inline__ void swizzle_alsa_channels(_THIS) { if (this->spec.channels == 6) { const Uint16 fmtsize = (this->spec.format & 0xFF); /* bits/channel. */ if (fmtsize == 16) swizzle_alsa_channels_6_16bit(this); else if (fmtsize == 8) swizzle_alsa_channels_6_8bit(this); else if (fmtsize == 32) swizzle_alsa_channels_6_32bit(this); else if (fmtsize == 64) swizzle_alsa_channels_6_64bit(this); } /* !!! FIXME: update this for 7.1 if needed, later. */ }