Audio Channel Order
Channel order specifies which position or role each signal occupies in an audio data sequence.
The dialogue waveform can decode perfectly and still come from the wrong speaker. Channel order associates positions in an audio buffer with channel roles. Moving the bytes successfully is only half the job; their meaning must travel with them.
Interpret one six-channel frame
Suppose an interleaved frame has the following values and uses the WAVEFORMATEXTENSIBLE mask 0x60F:
| Array position | Role defined by that mask | Value |
|---|---|---|
| 0 | Front left | +0.10 |
| 1 | Front right | +0.12 |
| 2 | Front center | +0.60 |
| 3 | LFE | +0.05 |
| 4 | Side left | −0.20 |
| 5 | Side right | +0.25 |
The next six values belong to the next time position in the same order. Sending position 2 to a surround output would move the center's +0.60 sample behind the listener. Misinterpreting position 3 as a full-range speaker signal also changes the purpose of that channel.
A mask is a set of roles with a defined ordering rule
WAVEFORMATEXTENSIBLE uses flags for speaker positions. Interleaved samples follow the ascending set-bit order, not the order in which names happen to appear in a user interface.
| Example mask | Roles in sample order |
|---|---|
| 0x3 | Front left, front right |
| 0x60F | Front left, front right, center, LFE, side left, side right |
| 0x63F | Front left, front right, center, LFE, back left, back right, side left, side right |
For 0x60F, the flags are 0x1 + 0x2 + 0x4 + 0x8 + 0x200 + 0x400. Six flags identify six channels. The 7.1 mask adds the back-left and back-right flags before the side pair in numerical bit order.
A 5.1 mask using back positions exists too. Those names can describe a different source layout even if a room uses similar physical speakers for its two surrounds.
Map roles across each boundary
Compressed codecs, containers, and playback APIs can describe their own conventions. A decoder often exposes an already labeled working layout that differs from the codec's internal packing. Software must translate by role across these boundaries.
A reliable conversion follows this sequence:
- Read the source's layout and coding convention.
- Decode and identify each output channel by its role.
- Map those roles into the destination's required order.
- Supply the corresponding destination layout description.
An arbitrary rearrangement based only on the codec name can undo a decoder's correct mapping. Changing the label without moving values, or moving values without updating the label, are reciprocal ways to create a routing error.
Planar storage does not remove this requirement. It places each channel in a separate buffer, and those buffers still have ordered or explicitly identified roles.
For an Emby session with repeatable misplaced dialogue or effects, compare the source layout, decoder output, and destination roles. A known channel-identification recording is more informative than a movie scene whose channels may deliberately be quiet or shared. The goal is to verify which named signal reaches which named output.