See also PCMWAVEFORMAT
typedef struct waveformat_tag { WORD wFormatTag; WORD nChannels; DWORD nSamplesPerSec; DWORD nAvgBytesPerSec; WORD nBlockAlign; } WAVEFORMAT;
The WAVEFORMAT structure describes the format of waveform data. Only format information common to all waveform data formats is included in this structure. For formats that require additional information, this structure is included as a field in another data structure along with the additional information.
wFormatTag
Specifies the format type. Currently defined format types are as follows:
WAVE_FORMAT_PCM | Waveform data is PCM. |
nChannels
Specifies the number of channels in the waveform data. Mono data uses 1 channel and stereo data uses 2 channels.
nSamplesPerSec
Specifies the sample rate in samples per second.
nAvgBytesPerSec
Specifies the required average data transfer rate in bytes per second.
nBlockAlign
Specifies the block alignment in bytes. The block alignment is the minimum atomic unit of data. For PCM data, the block alignment is the number of bytes used by a single sample, including data for both channels if the data is stereo. For example, the block alignment for 16-bit stereo PCM is 4 bytes (2 channels, 2 bytes per sample).