My multichannel QuickTime audio Track has an
AudioChannelLayout with a channel bitmap. The
kAudioChannelLayoutTag_UseChannelBitmap and the
mChannelBitmap field contains the value 0x3F-- Left, Right, Center, LFEScreen, LeftSurround, RightSurround. How do I know what order these channels appear in the audio buffer?
A: If an
AudioChannelLayout has a bitmap, there is only one order the channels present can be in. This order is commonly known as USB order and is the same order the bits are defined in the Channel Bitmap Constants enumeration, see
@enum Channel Bitmap Constants
@abstract These constants are for use in the mChannelBitmap field of an
kAudioChannelBit_Left = (1L<<0),
kAudioChannelBit_Right = (1L<<1),
kAudioChannelBit_Center = (1L<<2),
kAudioChannelBit_LFEScreen = (1L<<3),
kAudioChannelBit_LeftSurround = (1L<<4),
kAudioChannelBit_RightSurround = (1L<<5),
Therefore, in the bitmap described above, the first channel is Left, then Right, then Center, then LFE, then Left Surround and finally Right Surround.
Note: This is not specific to QuickTime. Anytime you encounter an audio channel layout with a bitmap, the bitmap tells you the channels present as well as the order.
Document Revision History