Wavdump is a simple utility to display the contents of a WAV sound file. I wrote this app basically to verify and demonstrate the point that WAV is really simple; so simple that I got this app working, from scratch, in an afternoon. I spent a few hours since then tweaking it. You can browse the code below, to see how simple it is.

Browsing Wavdump

The Wavdump app consists of just 2 Java files, linked below. To view the code, just click the links below.

Please note that this code is provided as-is, and for educational purposes only. You're really not supposed to use this for anything serious; it certainly doesn't support all the features of WAV files, and certainly has bugs.

The files are:

Using Wavdump

You will need to have a Java run-time installed, and you will need a command-line window; Wavdump doesn't have any kind of graphical user interface. You'll also need to know how to build a Java app. The package name is org.hermit.wavdump, so to build the app you will need to place the files within folders accordingly.

Once you've downloaded and built it, get onto a command line, and run the command

java -ea org.hermit.wavdump.WavDump [ flags ] wav-file ...

The [ flags ] part is zero or more of the following options (leave it off to get the default behaviour):

Display all audio samples: this produces a MASSIVE quantity of output!
Display a summary of audio samples
Don't display audio samples
Display all of the contents of XML-formatted chunks
Display a summary of XML-formatted chunks
Don't display the contents of XML-formatted chunks


Wavdump was written just to demonstrate the core structure of WAV files; as such, it doesn't support all of the many varied options that the WAV format supports. Then again, most of those options aren't really used much anyhow.

In particular, Wavdump doesn't support any compressed modes, though it might just tell you that the file does contain compressed audio. Even for non-compressed audio, I've really only tested it with 24-bit integer and 32-bit float; and I'm not convinced about the decoding of float data. So by all means browse the code to see how a WAV decoder could work, but if you actually use this code for anything, be it on your own head.

It does at least seem to show what chunks are in a WAV file, and display the contents of the text and XML chunks that I know of, as well as the core WAV chunks.