You are on page 1of 3

11/8/2020 Minimal: Structure Of *.

wav Audio Files

Plus zakaria.neili@gmail.com Tableau de bord Déconnexion

Minimal
Less is more

Friday, 7 November 2008

Structure Of *.wav Audio Files About Me

Posted by Juri at 10:43 Labels: wav Juri

View my complete profile


Wave file structure is very simple. The structure can be divided into 3
parts (chunks).
Labels
First chunk: The first 4 bytes should be "RIFF". Then come 4 bytes,
which indicate the size of file. Then comes "WAVE".
AI (5) AJAX (1) algorithm (3) Amazon EC2 (1) audio (3) blog
(1) book (4) C (1) C# (12) C++ (7) Chef (5)
Second chunk: It starts with "fmt ". Then come 4 bytes showing the chefspec (2) Code Jam (3) conference (2) contest (3)
length of "fmt " chunk. Then come audio format, number of channels, Continuous Delivery (1) Continuous Integration (1) course (1) Eee (2)
sample rate, Byterate, Block align and bits ber sample. Excel (2) Fibonacci (1) foodcritic (1) Fourier (1) fun (2) game (1)
gdm (1) geekout (2) gem (3) Google (6) gzip (1) IDE (1)
Third chunk: It is the audio data itself. As always 4 first bytes - name of Java (4) Javascript (1) jenkins (3) Knife (1) Linq (1) Lisp (4)
the chunk. 4 bytes after that - the length of the chunk in bytes. After that LiveRebel (1) makefile (1) Mercurial (1) Moles (1) MongoDB (1)

come samples itself. 2 * number_of_channels bytes each sample. MsSql (3) myself (3) MySql (1) PostgreSql (4) Rails (4)
regex (1) RSpec (1) Ruby (13) Shoes (1) Silverlight (1)
There can be also other chunks between the first and the third, but they
solution (1) tar (1) testing (3) Ubuntu (10) wav (1) why?
are really not widely used. If you got interested in it, a very good article
(1) wifi (1) Windows (1)
about "Wave file format" is on The Sonic Spot .

Random Quote

Good code is its own best documentation. As you're


about to add a comment, ask yourself, "How can I

dracoater.blogspot.com/2008/11/comparing-2-audio-wav-files.html 1/3
11/8/2020 Minimal: Structure Of *.wav Audio Files

improve the code so that this comment isn't needed?" ~


Steve McConnell

Blog Archive


► 2017 (1)

► 2013 (6)

► 2012 (2)

► 2011 (8)

► 2010 (28)

► 2009 (19)

▼ 2008 (13)

▼ November (3)
Comparing 2 Audio (*.wav) Files
Structure Of *.wav Audio Files
Going to English


► September (1)

► July (2)

► May (3)
So we have here an example. We see the first chunk (purple). It shows ►
► February (2)
the length of the file - 0x(00 00 08 24) = 0x824 = 2084 ►
► January (2)
Bytes should be read in reverse direction. First read byte has the
smallest rank!

You can check yourself: left channel sample #5 = 0xE734 and right one is
0xA623.

Continued there...

Reactions: interesting (0) funny (0) informative (0)

dracoater.blogspot.com/2008/11/comparing-2-audio-wav-files.html 2/3
11/8/2020 Minimal: Structure Of *.wav Audio Files

No comments:

Post a comment

Enter your comment...

Comment as:
online shopping (Google)

Sign out

Newer Post Home Older Post

Subscribe to: Post Comments (Atom)

Simple theme. Powered by Blogger.

dracoater.blogspot.com/2008/11/comparing-2-audio-wav-files.html 3/3

You might also like