Microsoft DirectX 8.1 (C++) |
The WAVEFORMATEXTENSIBLE structure defines the format of waveform-audio data for formats having more than two channels.
This structure is part of the Platform SDK and is not declared in Dsound.h. It is documented here for convenience.
Syntax
typedef struct {
WAVEFORMATEX Format;
union {
WORD wValidBitsPerSample;
WORD wSamplesPerBlock;
WORD wReserved;
} Samples;
DWORD dwChannelMask;
GUID SubFormat;
} WAVEFORMATEXTENSIBLE, *PWAVEFORMATEXTENSIBLE;
Members
Format
WAVEFORMATEX structure that specifies the basic format. The wFormatTag member must be WAVE_FORMAT_EXTENSIBLE, defined in Mmreg.h. The cbSize member must be at least 22.
wValidBitsPerSample
How many bits of precision are present in the signal. Usually equal to WAVEFORMATEX.wBitsPerSample.
wSamplesPerBlock
How many samples are contained in one compressed block of audio data. If zero, the number of samples in each block is variable.
wReserved
Set to zero if neither wValidBitsPerSample nor wSamplesPerBlock applies to the format.
dwChannelMask
Bitmask specifying which channels are present. See Remarks.
SubFormat
Subformat of the data. Must be KSDATAFORMAT_SUBTYPE_PCM, defined in Ksmedia.h.
Remarks
The dwChannelMask member indicates which channels are present in the multichannel 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 in Ksmedia.h and Mmreg.h as follows:
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
SPEAKER_BACK_CENTER
SPEAKER_SIDE_LEFT
SPEAKER_SIDE_RIGHT
SPEAKER_TOP_CENTER
SPEAKER_TOP_FRONT_LEFT
SPEAKER_TOP_FRONT_CENTER
SPEAKER_TOP_FRONT_RIGHT
SPEAKER_TOP_BACK_LEFT
SPEAKER_TOP_BACK_CENTER
SPEAKER_TOP_BACK_RIGHT
For more information on this structure, see the document Enhanced Audio Formats for Multi-Channel Configurations and High-Bit Resolution, available at http://www.microsoft.com/hwdev/audio/multichaud.htm.
Requirements
Header: Declared in Mmreg.h, Ksproxy.h.