File format for 24 bit 48 kHz 5.1 Multichannel WAV file


Sample WAV file format as recorded by Creative Audio Creation Mode Console and X-Fi Elite Pro SoundCard.
WAV file size: 22,550,480 bytes

----- Hex dump (partial) -------

0000   52 49 46 46 C8 17 58 01 57 41 56 45 66 6D 74 20   RIFF..X.WAVEfmt 
0010   28 00 00 00 FE FF 06 00 80 BB 00 00 00 2F 0D 00   (............/..
0020   12 00 18 00 16 00 18 00 3F 00 00 00 01 00 00 00   ........?.......
0030   00 00 10 00 80 00 00 AA 00 38 9B 71 66 61 63 74   .........8.qfact
0040   04 00 00 00 40 59 39 00 64 61 74 61 80 17 58 01   ....@Y9.data..X.
0050   BB FF FF A1 FF FF 00 00 00 00 00 00 00 00 00 00   ................
0060   00 00 E6 FF FF D8 FF FF 00 00 00 00 00 00 00 00   ................
0070   00 00 00 00 B6 FF FF FD FF FF 00 00 00 00 00 00   ................

 .....

----- Byte breakdown -------

{52 49 46 46}   "RIFF"
{C8 17 58 01}    size of RIFF chunk
{57 41 56 45}   "WAVE"

{66 6D 74 20}   "fmt "
{28 00 00 00}    size of fmt chunk (40 bytes; a WAVEFORMATEXTENSIBLE struct)
{FE FF}     wFormatTag:  WAVE_FORMAT_EXTENSIBLE
{06 00}      nChannels:  6
{80 BB 00 00}    nSamplesPerSec:  48000
{00 2F 0D 00}    nAvgBytesPerSec:  864000
{12 00}    nBlockAlign:  18
{18 00}    nBitsPerSample:  24  (in each channel)
{16 00}    cbSize:  22    (extra bytes of format information)
{18 00}    wValidBitsPerSample:  24   (all bits of data sample are significant)
{3F 00 00 00}    dwChannelMask: 63 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)
{01 00 00 00 00 00 10 00 80 00 00 AA 00 38 9B 71}    SubFormat:  KSDATAFORMAT_SUBTYPE_PCM

{66 61 63 74}  "fact"
{04 00 00 00}  size of fact chunk
{40 59 39 00}  total bytes in each channel:  (size of data)/nChannels  = (22,550,400)/6  =  3,758,400

{64 61 74 61}   "data"
{80 17 58 01}   size of data chunk  (22,550,400 bytes)
{ .......................}   actual audio data, channels ordered as:
 First Multichannel Sample 
 --------------------------
{BB FF FF}  3 bytes Front Left   
{A1 FF FF}  3 bytes Front Right
{00 00 00}  3 bytes Center
{00 00 00}  3 bytes Low Frequency (subwoofer)
{00 00 00}  3 bytes Rear Left
{00 00 00}  3 bytes Rear Right

Second Multichannel Sample
 --------------------------
{E6 FF FF}  3 bytes Front Left   
 .,.. etc ....

Notes: 
Bytes in samples are 24bit signed integers (2's complement) little-endian ordered.
For a 24 bit sample as a signed integer:
   maximum positive value is 0x7FFFFF or +8,388,607 (or 2^23 - 1)    minimum negative value is 0x800000 or -8,388,608

----- Sample 24 bit/ 96 kHz 5.1 Multichannel WAV File -------

Here is a simple 6 channel 24 bit/ 96 kHz multi-tone multichannel wav file.
   wav5196.wav (8.23 MB)
The file was synthesized programatically using a C# application (to be posted). The wav amplitude is 83% of peak digital and the duration is exactly 5 seconds. The 6 standard "5.1" channels (FL, FR, C, Sub, RL, RR) are targetted in the wav file. The data for each of the 6 channels corresponds to the note sequence of the B11 musical chord. The list below shows, in the order interleaved in the wav file data section, the speaker channel, note name and note number, and the note frequency in the equally-tempered chromatic scale with A4 = 440.000 Hz:
	Front Left          B2  (root)         123.471  Hz  
	Front Right         F3# (5th)          184.997	Hz
	Front Center        A3 (flat7th)       220.000  Hz
	Sub                 B1 (root)           61.735  Hz
	Rear Left           C4# (9th)          277.183  Hz
	Rear Right          E4 (11th)          329.628  Hz
The note sent to the Sub channel is an octave lower than the next highest note which targets the Front Left channel. The Sub note at 61.735 Hz is the lowest note achievable on the F French Horn.

References

Multiple Channel Audio Data and WAVE Files
WAVEFORMATEXTENSIBLE documentation