The format chunk in the Wave file format has the following structure.
Description | Length in bytes | Starts at byte in the chunk | Value |
chunk ID | 4 | 0x00 | The ASCII character string "fmt " (note the space at the end) |
size | 4 | 0x04 | The size of the format chunk (number of bytes) less 8 (less the "chunk ID" and the "size"). The usual size of the format chunk is 16, unless there are any extra format bytes (see below) |
compression code | 2 | 0x08 | Various. A typical compression code is 1, signifying uncompressed Pulse Code Modulation (PCM). Other values are shown below |
number of channels | 2 | 0x0A | Various. The typical number of channels is 1 in mono waves and 2 in stereo waves |
sampling rate | 4 | 0x0C | Various. An example sampling rate is 44100 = 0x0000AC44 for 44,100 Hz |
average bytes per second | 4 | 0x10 | Various. For example, a PCM wave file that has a sampling rate of 44100 Hz, 1 channel, and sampling resolution of 16 bits (2 bytes) per sample, will have an average number of bytes equal to 44100 * 2 * 1 = 88,200 |
block align | 2 | 0x14 | Various. For example, a PCM wave that has a sampling resolution of 16 bits (2 bytes) and has 2 channels will record a block of samples in 2 * 2 = 4 bytes |
significant bits per sample | 2 | 0x16 | Various. These bytes define the sampling resolution of the file. A typical sampling resolution is 16 bits per sample, but could be anything greater than 1 |
number of extra format bytes | 2 | 0x18 | Various. These bytes define the number of extra format bytes to follow in the format chunk. This field may or may not be present |
extra format bytes | various | 0x1A | Various. These may or may not be present |
As with all information in wave files, data is stored little-endian. The number 88,200 = 0x00015888 will be stored as the byte sequence 0x88 0x58 0x01 0x00. Also, all information has to be word aligned (at every two bytes). If the audio data contains an odd number of bytes, it should be padded with a zero byte, although this byte will not be counted in the size variable.
A note on sampling resolution and data representation
By convention, (although different data representations are possible), when the sampling resolution of uncompressed PCM files (compression code 1) is 8-bit, the audio samples in the data chunk use unsigned integer numbers. Thus, audio samples range between 0 and 255 (0x00 and 0xFF) and silence is 127 (0x7F). When the sampling resolution of uncompressed PCM files is 16-bit or 24-bit, the audio samples in the data chunk are signed integers. Silence then is represented by 0. When the sampling resolution is 32-bit, the data would typically be signed floating point between -1 and 1 and silence would be 0.
Compression codes
A list of defined compression codes is as follows.
Decimal value | Hexadecimal value | Description |
0 | 0x0000 | Unknown |
1 | 0x0001 | Microsoft PCM (uncompressed) |
2 | 0x0002 | Microsoft ADPCM |
3 | 0x0003 | Microsoft IEEE float |
4 | 0x0004 | Compaq VSELP |
5 | 0x0005 | IBM CVSD |
6 | 0x0006 | ITU G.711 a-law |
7 | 0x0007 | ITU G.711 u-law |
8 | 0x0008 | Microsoft DTS |
9 | 0x0009 | DRM |
10 | 0x000A | WMA 9 Speech |
11 | 0x000B | Microsoft Windows Media RT Voice |
16 | 0x0010 | OKI-ADPCM |
17 | 0x0011 | Intel IMA/DVI-ADPCM |
18 | 0x0012 | Videologic Mediaspace ADPCM |
19 | 0x0013 | Sierra ADPCM |
20 | 0x0014 | Antex G.723 ADPCM |
21 | 0x0015 | DSP Solutions DIGISTD |
22 | 0x0016 | DSP Solutions DIGIFIX |
23 | 0x0017 | Dialogic OKI ADPCM |
24 | 0x0018 | Media Vision ADPCM |
25 | 0x0019 | HP CU |
26 | 0x001A | HP Dynamic Voice |
32 | 0x0020 | Yamaha ADPCM |
33 | 0x0021 | SONARC Speech Compression |
34 | 0x0022 | DSP Group True Speech |
35 | 0x0023 | Echo Speech Corp. |
36 | 0x0024 | Virtual Music Audiofile AF36 |
37 | 0x0025 | Audio Processing Tech. |
38 | 0x0026 | Virtual Music Audiofile AF10 |
39 | 0x0027 | Aculab Prosody 1612 |
40 | 0x0028 | Merging Tech. LRC |
48 | 0x0030 | Dolby AC2 |
49 | 0x0031 | Microsoft GSM610 |
50 | 0x0032 | MSN Audio |
51 | 0x0033 | Antex ADPCM |
52 | 0x0034 | Control Resources VQLPC |
53 | 0x0035 | DSP Solutions DIGIREAL |
54 | 0x0036 | DSP Solutions DIGIADPCM |
55 | 0x0037 | Control Resources CR10 |
56 | 0x0038 | Natural MicroSystems VBX ADPCM |
57 | 0x0039 | Crystal Semiconductors IMA ADPCM |
58 | 0x003A | Echo Speech ECHOSC3 |
59 | 0x003B | Rockwell ADPCM |
60 | 0x003C | Rockwell DIGITALK |
61 | 0x003D | Xebec Multimedia |
64 | 0x0040 | Antex G.721 ADPCM |
65 | 0x0041 | Antex G.728 CELP |
66 | 0x0042 | Microsoft MSG723 |
67 | 0x0043 | IBM AVC ADPCM |
69 | 0x0045 | ITU-T G.726 |
80 | 0x0050 | Microsoft MPEG |
81 | 0x0051 | RT23 or PAC |
82 | 0x0052 | InSoft RT24 |
83 | 0x0053 | InSoft PAC |
85 | 0x0055 | MP3 |
89 | 0x0059 | Cirrus |
96 | 0x0060 | Cirrus Logic |
97 | 0x0061 | ESS Tech. PCM |
98 | 0x0062 | Voxware Inc. |
99 | 0x0063 | Canopus ATRAC |
100 | 0x0064 | APICOM G.726 ADPCM |
101 | 0x0065 | APICOM G.722 ADPCM |
102 | 0x0066 | Microsoft DSAT |
103 | 0x0067 | Microsoft DSAT-DISPLAY |
105 | 0x0069 | Voxware Byte Aligned |
112 | 0x0070 | Voxware ACB |
113 | 0x0071 | Voxware AC10 |
114 | 0x0072 | Voxware AC16 |
115 | 0x0073 | Voxware AC20 |
116 | 0x0074 | Voxware MetaVoice |
117 | 0x0075 | Voxware MetaSound |
118 | 0x0076 | Voxware RT29HW |
119 | 0x0077 | Voxware VR12 |
120 | 0x0078 | Voxware VR18 |
121 | 0x0079 | Voxware TQ40 |
122 | 0x007A | Voxware SC3 |
123 | 0x007B | Voxware SC3 |
128 | 0x0080 | Soundsoft |
129 | 0x0081 | Voxware TQ60 |
130 | 0x0082 | Microsoft MSRT24 |
131 | 0x0083 | AT&T G.729A |
132 | 0x0084 | Motion Pixels MVI-MV12 |
133 | 0x0085 | DataFusion G.726 |
134 | 0x0086 | DataFusion GSM610 |
136 | 0x0088 | Iterated Systems Audio |
137 | 0x0089 | Onlive |
138 | 0x008A | Multitude, Inc. FT SX20 |
139 | 0x008B | Infocom IT’S A/S G.721 ADPCM |
140 | 0x008C | Convedia G729 |
141 | 0x008D | Congruency, Inc. (not specified) |
145 | 0x0091 | Siemens SBC24 |
146 | 0x0092 | Sonic Foundry Dolby AC3 APDIF |
147 | 0x0093 | MediaSonic G.723 |
148 | 0x0094 | Aculab Prosody 8kbps |
151 | 0x0097 | ZyXEL ADPCM |
152 | 0x0098 | Philips LPCBB |
153 | 0x0099 | Studer Professional Audio Packed |
160 | 0x00A0 | Maiden PhonyTalk |
161 | 0x00A1 | Racal Recorder GSM |
162 | 0x00A2 | Racal Recorder G720.a |
163 | 0x00A3 | Racal G723.1 |
164 | 0x00A4 | Racal Tetra ACELP |
176 | 0x00B0 | NEC AAC NEC Corporation |
255 | 0x00FF | AAC |
256 | 0x0100 | Rhetorex ADPCM |
257 | 0x0101 | IBM u-Law |
258 | 0x0102 | IBM a-Law |
259 | 0x0103 | IBM ADPCM |
273 | 0x0111 | Vivo G.723 |
274 | 0x0112 | Vivo Siren |
288 | 0x0120 | Philips Speech Processing CELP |
289 | 0x0121 | Philips Speech Processing GRUNDIG |
291 | 0x0123 | Digital G.723 |
293 | 0x0125 | Sanyo LD ADPCM |
304 | 0x0130 | Sipro Lab ACEPLNET |
305 | 0x0131 | Sipro Lab ACELP4800 |
306 | 0x0132 | Sipro Lab ACELP8V3 |
307 | 0x0133 | Sipro Lab G.729 |
308 | 0x0134 | Sipro Lab G.729A |
309 | 0x0135 | Sipro Lab Kelvin |
310 | 0x0136 | VoiceAge AMR |
320 | 0x0140 | Dictaphone G.726 ADPCM |
336 | 0x0150 | Qualcomm PureVoice |
337 | 0x0151 | Qualcomm HalfRate |
341 | 0x0155 | Ring Zero Systems TUBGSM |
352 | 0x0160 | Microsoft Audio1 |
353 | 0x0161 | Windows Media Audio V2 V7 V8 V9 / DivX audio (WMA) / Alex AC3 Audio |
354 | 0x0162 | Windows Media Audio Professional V9 |
355 | 0x0163 | Windows Media Audio Lossless V9 |
356 | 0x0164 | WMA Pro over S/PDIF |
368 | 0x0170 | UNISYS NAP ADPCM |
369 | 0x0171 | UNISYS NAP ULAW |
370 | 0x0172 | UNISYS NAP ALAW |
371 | 0x0173 | UNISYS NAP 16K |
372 | 0x0174 | MM SYCOM ACM SYC008 SyCom Technologies |
373 | 0x0175 | MM SYCOM ACM SYC701 G726L SyCom Technologies |
374 | 0x0176 | MM SYCOM ACM SYC701 CELP54 SyCom Technologies |
375 | 0x0177 | MM SYCOM ACM SYC701 CELP68 SyCom Technologies |
376 | 0x0178 | Knowledge Adventure ADPCM |
384 | 0x0180 | Fraunhofer IIS MPEG2AAC |
400 | 0x0190 | Digital Theater Systems DTS DS |
512 | 0x0200 | Creative Labs ADPCM |
514 | 0x0202 | Creative Labs FASTSPEECH8 |
515 | 0x0203 | Creative Labs FASTSPEECH10 |
528 | 0x0210 | UHER ADPCM |
533 | 0x0215 | Ulead DV ACM |
534 | 0x0216 | Ulead DV ACM |
544 | 0x0220 | Quarterdeck Corp. |
560 | 0x0230 | I-Link VC |
576 | 0x0240 | Aureal Semiconductor Raw Sport |
577 | 0x0241 | ESST AC3 |
592 | 0x0250 | Interactive Products HSX |
593 | 0x0251 | Interactive Products RPELP |
608 | 0x0260 | Consistent CS2 |
624 | 0x0270 | Sony SCX |
625 | 0x0271 | Sony SCY |
626 | 0x0272 | Sony ATRAC3 |
627 | 0x0273 | Sony SPC |
640 | 0x0280 | TELUM Telum Inc. |
641 | 0x0281 | TELUMIA Telum Inc. |
645 | 0x0285 | Norcom Voice Systems ADPCM |
768 | 0x0300 | Fujitsu FM TOWNS SND |
769 | 0x0301 | Fujitsu (not specified) |
770 | 0x0302 | Fujitsu (not specified) |
771 | 0x0303 | Fujitsu (not specified) |
772 | 0x0304 | Fujitsu (not specified) |
773 | 0x0305 | Fujitsu (not specified) |
774 | 0x0306 | Fujitsu (not specified) |
775 | 0x0307 | Fujitsu (not specified) |
776 | 0x0308 | Fujitsu (not specified) |
848 | 0x0350 | Micronas Semiconductors, Inc. Development |
849 | 0x0351 | Micronas Semiconductors, Inc. CELP833 |
1024 | 0x0400 | Brooktree Digital |
1025 | 0x0401 | Intel Music Coder (IMC) |
1026 | 0x0402 | Ligos Indeo Audio |
1104 | 0x0450 | QDesign Music |
1280 | 0x0500 | On2 VP7 On2 Technologies |
1281 | 0x0501 | On2 VP6 On2 Technologies |
1664 | 0x0680 | AT&T VME VMPCM |
1665 | 0x0681 | AT&T TCP |
1792 | 0x0700 | YMPEG Alpha (dummy for MPEG-2 compressor) |
2222 | 0x08AE | ClearJump LiteWave (lossless) |
4096 | 0x1000 | Olivetti GSM |
4097 | 0x1001 | Olivetti ADPCM |
4098 | 0x1002 | Olivetti CELP |
4099 | 0x1003 | Olivetti SBC |
4100 | 0x1004 | Olivetti OPR |
4352 | 0x1100 | Lernout & Hauspie |
4353 | 0x1101 | Lernout & Hauspie CELP codec |
4354 | 0x1102 | Lernout & Hauspie SBC codec |
4355 | 0x1103 | Lernout & Hauspie SBC codec |
4356 | 0x1104 | Lernout & Hauspie SBC codec |
5120 | 0x1400 | Norris Comm. Inc. |
5121 | 0x1401 | ISIAudio |
5376 | 0x1500 | AT&T Soundspace Music Compression |
6172 | 0x181C | VoxWare RT24 speech codec |
6174 | 0x181E | Lucent elemedia AX24000P Music codec |
6513 | 0x1971 | Sonic Foundry LOSSLESS |
6521 | 0x1979 | Innings Telecom Inc. ADPCM |
7175 | 0x1C07 | Lucent SX8300P speech codec |
7180 | 0x1C0C | Lucent SX5363S G.723 compliant codec |
7939 | 0x1F03 | CUseeMe DigiTalk (ex-Rocwell) |
8132 | 0x1FC4 | NCT Soft ALF2CD ACM |
8192 | 0x2000 | FAST Multimedia DVM |
8193 | 0x2001 | Dolby DTS (Digital Theater System) |
8194 | 0x2002 | RealAudio 1 / 2 14.4 |
8195 | 0x2003 | RealAudio 1 / 2 28.8 |
8196 | 0x2004 | RealAudio G2 / 8 Cook (low bitrate) |
8197 | 0x2005 | RealAudio 3 / 4 / 5 Music (DNET) |
8198 | 0x2006 | RealAudio 10 AAC (RAAC) |
8199 | 0x2007 | RealAudio 10 AAC+ (RACP) |
9472 | 0x2500 | Reserved range to 0x2600 Microsoft |
13075 | 0x3313 | makeAVIS (ffvfw fake AVI sound from AviSynth scripts) |
16707 | 0x4143 | Divio MPEG-4 AAC audio |
16897 | 0x4201 | Nokia adaptive multirate |
16963 | 0x4243 | Divio G726 Divio, Inc. |
17228 | 0x434C | LEAD Speech |
22092 | 0x564C | LEAD Vorbis |
22358 | 0x5756 | WavPack Audio |
26447 | 0x674F | Ogg Vorbis (mode 1) |
26448 | 0x6750 | Ogg Vorbis (mode 2) |
26449 | 0x6751 | Ogg Vorbis (mode 3) |
26479 | 0x676F | Ogg Vorbis (mode 1+) |
26480 | 0x6770 | Ogg Vorbis (mode 2+) |
26481 | 0x6771 | Ogg Vorbis (mode 3+) |
28672 | 0x7000 | 3COM NBX 3Com Corporation |
28781 | 0x706D | FAAD AAC |
31265 | 0x7A21 | GSM-AMR (CBR, no SID) |
31266 | 0x7A22 | GSM-AMR (VBR, including SID) |
41216 | 0xA100 | Comverse Infosys Ltd. G723 1 |
41217 | 0xA101 | Comverse Infosys Ltd. AVQSBC |
41218 | 0xA102 | Comverse Infosys Ltd. OLDSBC |
41219 | 0xA103 | Symbol Technologies G729A |
41220 | 0xA104 | VoiceAge AMR WB VoiceAge Corporation |
41221 | 0xA105 | Ingenient Technologies Inc. G726 |
41222 | 0xA106 | ISO/MPEG-4 advanced audio Coding |
41223 | 0xA107 | Encore Software Ltd G726 |
41225 | 0xA109 | Speex ACM Codec xiph.org |
57260 | 0xDFAC | DebugMode SonicFoundry Vegas FrameServer ACM Codec |
59144 | 0xE708 | Unknown |
61868 | 0xF1AC | Free Lossless Audio Codec FLAC |
65534 | 0xFFFE | Extensible |
65535 | 0xFFFF | Development |
See also:
Wave file format
Add new comment