WAV format (a contraction of "WAVEform audio format") is a digital audio data storage standard defined by Microsoft and IBM.
It is probably the most widely used sound storage format, as it is the default sound format in the operating system Microsoft Windows.
The WAV format is not actually an encoding format, but an audio container format. WAV files is based around the RIFF (Resource Interchange File Format) standard, which defines a structure for storing multimedia data.
Therefore, a WAV file may contain
The WAV format defines a data structure for gathering audio data in the form of chunks. The data structure is nested, like Russian dolls.
The overall structure of the file is:
| Address (byte) | Name | Size (bytes) | Description |
| 00h | rID | 4h | Word "RIFF" |
| 04h | rLen | 4h | Chunk size |
| 08h | rData | rLen | Data Chunk |
The rData segment contains the chunk, encoded as follows:
| Address (byte) | Name | Size (bytes) | Description |
| 00h | wID | 4 | Term "WAVE" |
| 04h | Chunk format | 18 | Format used |
| 1Ch | WAVE Data Chunk | ? | Data |
| Shift (byte) | Name | Size (bytes) | Description |
| 00h | fId | 4 | Term "fmt " (the space is necessary) |
| 04h | fLen | 4 | ? |
| 08h | wFormatTag | 2 | Format (generally 1, for Microsoft Pulse Code Modulation) |
| 0Ah | nChannels | 2 | Number of channels (1=mono, 2=stereo) |
| 0Ch | nSamplesPerSec | 4 | Sampling rate (in Hz) |
| 10h | nAvgBytesPerSec | 4 | nChannels * nSamplesPerSec * (nBitsPerSample/8) For estimating the needed buffer size |
| 14h | nBlockAlign | 2 | nChannels * (nBitsPerSample / 8) For buffer alignment |
| 16h | FormatSpecific | 2 | Sample length, in bits (8 or 16) |
| Address (byte) | Name | Size (bytes) | Description |
| 00h | dId | 4 | Term "data" |
| 04h | dLen | 4 | Length of dData field (in bytes) |
| 08h | dData | dLen | Sampled sound data |
The dData field is formatted as follows: