Microsoft Windows CE 3.0  

WAVEFORMATEX Structure

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The WAVEFORMATEXstructure contains information for the audio stream(s) of an AVI RIFF file. This structure has the following members.

typedef struct waveformat_extended_tag {
WORD
wFormatTag
;
WORD
nChannels
;
DWORD
nSamplesPerSec
;
DWORD
nAvgBytesPerSec
;
WORD
nBlockAlign
;
WORD
wBitsPerSample
;
WORD
cbSize
;
} WAVEFORMATEX;
wFormatTag
Defines the audio waveform type of the audio stream. A complete list of format tags can be found in the Mmreg.h header file included with Microsoft Visual C++ and other Microsoft products.
nChannels
Specifies the number of channels in the audio stream, 1 for mono, 2 for stereo.
nSamplesPerSec
Specifies the frequency of the sample rate of the audio stream in samples/second (Hz). Examples are 11,025, 22,050, or 44,100.
nAvgBytesPerSec
Specifies the average data rate. Playback software can estimate the buffer size by using this value.
nBlockAlign
Specifies the block alignment of the data, in bytes. Playback software must process a multiple of nBlockAlignbytes of data at a time, so that the value of nBlockAligncan be used for buffer alignment.
wBitsPerSample
Specifies the number of bits per sample per channel data. Each channel is assumed to have the same sample resolution. If this field is not needed, then you should set it to zero.
cbSize
Specifies the size, in bytes, of the extra information in the format header, not including the size of the WAVEFORMATEXstructure. For example, in the wave format corresponding to the wFormatTagWAVE_FORMAT_IMA_ADPCM, cbSizeis calculated as sizeof(IMAADPCMWAVEFORMAT) - sizeof(WAVEFORMATEX), which yields two.

 Last updated on Tuesday, May 18, 2004

© 2004 Microsoft Corporation. All rights reserved.