Structure used in XMA2WAVEFORMAT for per-stream data.
typedef struct XMA2STREAMFORMAT {
BYTE Channels;
BYTE RESERVED;
WORD ChannelMask;
} XMA2STREAMFORMAT;
Channels
Number of channels in the stream (1 or 2).
RESERVED
Reserved.
ChannelMask
Spatial positions of the channels in the stream.
The least significant bit corresponds with the front left speaker, the next least significant bit corresponds to the front right speaker, and so on. The bits, in order of significance, are defined as follows.
| Speaker position | Flag bit |
|---|---|
| SPEAKER_FRONT_LEFT | 0x1 |
| SPEAKER_FRONT_RIGHT | 0x2 |
| SPEAKER_FRONT_CENTER | 0x4 |
| SPEAKER_LOW_FREQUENCY | 0x8 |
| SPEAKER_BACK_LEFT | 0x10 |
| SPEAKER_BACK_RIGHT | 0x20 |
| SPEAKER_FRONT_LEFT_OF_CENTER | 0x40 |
| SPEAKER_FRONT_RIGHT_OF_CENTER | 0x80 |
| SPEAKER_BACK_CENTER | 0x100 |
| SPEAKER_SIDE_LEFT | 0x200 |
| SPEAKER_SIDE_RIGHT | 0x400 |
| SPEAKER_TOP_CENTER | 0x800 |
| SPEAKER_TOP_FRONT_LEFT | 0x1000 |
| SPEAKER_TOP_FRONT_CENTER | 0x2000 |
| SPEAKER_TOP_FRONT_RIGHT | 0x4000 |
| SPEAKER_TOP_BACK_LEFT | 0x8000 |
| SPEAKER_TOP_BACK_CENTER | 0x10000 |
| SPEAKER_TOP_BACK_RIGHT | 0x20000 |
| SPEAKER_ALL | 0x80000000 (Used to specify any possible permutation of speaker configurations) |
There are also predefined speadker configurations.
| Speaker configuration | Flag bits set |
|---|---|
| KSAUDIO_SPEAKER_MONO | (SPEAKER_FRONT_CENTER) |
| KSAUDIO_SPEAKER_STEREO | (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT) |
| KSAUDIO_SPEAKER_QUAD | (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \ SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT) |
| KSAUDIO_SPEAKER_SURROUND | (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \ SPEAKER_FRONT_CENTER | SPEAKER_BACK_CENTER) |
| KSAUDIO_SPEAKER_5POINT1 | (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \ SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \ SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT) |
| KSAUDIO_SPEAKER_7POINT1 | (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \ SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \ SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | \ SPEAKER_FRONT_LEFT_OF_CENTER | SPEAKER_FRONT_RIGHT_OF_CENTER) |
| KSAUDIO_SPEAKER_5POINT1_SURROUND | (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \ SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \ SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT) |
| KSAUDIO_SPEAKER_7POINT1_SURROUND | (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \ SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \ SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | \ SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT) |
There are also definitions for DVD speaker positions.
| Speaker position | Flag bit |
|---|---|
| KSAUDIO_SPEAKER_GROUND_FRONT_LEFT | SPEAKER_FRONT_LEFT |
| KSAUDIO_SPEAKER_GROUND_FRONT_CENTER | SPEAKER_FRONT_CENTER |
| KSAUDIO_SPEAKER_GROUND_FRONT_RIGHT | SPEAKER_FRONT_RIGHT |
| KSAUDIO_SPEAKER_GROUND_REAR_LEFT | SPEAKER_BACK_LEFT |
| KSAUDIO_SPEAKER_GROUND_REAR_RIGHT | SPEAKER_BACK_RIGHT |
| KSAUDIO_SPEAKER_TOP_MIDDLE | SPEAKER_TOP_CENTER |
| KSAUDIO_SPEAKER_SUPER_WOOFER | SPEAKER_LOW_FREQUENCY |
Header: Declared in xma2defs.h.
Library: Use xaudio2.lib or acphal.lib.