The chunks contained in the WAVE form definition are described in more detail in the following table:
fmt |
This chunk contains <wave-format>, which specifies the format of the data contained in <data-ck>. The <wave-format> chunk contains a structure consisting of the following fields: |
|
|
Field |
Description |
|
wFormatTag |
A number which indicates the WAVE format category of the file. The content of the <FormatSpecific> field of the 'fmt' chunk, and the interpretation of data in the “data” chunk, depend on this value. The valid values for <wFormatTag>, and a description of each WAVE format category, is given in the next section. |
|
nChannels |
The number of channels represented in <data-ck>, such as, 1 for mono or 2 for stereo. |
|
nSamplesPerSec |
The sampling rate (in samples per second) that each channel should be played back at. |
|
nAvgBytesPerSec |
The average number of bytes per second that data in <data-ck> should be transferred at. If <wFormatTag> is WAVE_FORMAT_PCM, then <nAvgBytesPerSec> should be equal to the following formula |
|
|
nChannels times nBitsPerSecond times nBitsPerSample over 8 |
|
|
Playback software can estimate the buffer size using the <nAvgBytesPerSec> value. |
|
nBlockAlign |
The block alignment (in bytes) of the data in <data-ck>. If <wFormatTag> is set to WAVE_FORMAT_PCM, then <nBlockAlign> should be equal to the following formula |
|
|
nChannels times nBitsPerSample over 8 |
|
|
Playback software needs to process a multiple of <nBlockAlign> bytes of data at a time, so that the value of <nBlockAlign> can be used for buffer alignment. |
|
FormatSpecific |
This field consists of zero or more bytes of parameters. Which parameters occur depends on the WAVE format category— see “WAVE Format Categories” below. Playback software should be written to allow for (and ignore) any unknown FormatSpecific parameters that occur at the end of this field. |
data |
This chunk contains <wave-data>, the actual waveform audio data. The format of <wave-data> depends on the <wFormatTag> value stored in the “fmt” chunk—see “Wave Format Categories” below. |
|