askvity

What is Inside a WAV File?

Published in Audio File Format 3 mins read

A WAV file primarily contains audio data, most commonly in an uncompressed format known as LPCM.

Understanding the Contents of a WAV File

At its core, a WAV file is a standard audio file format developed by Microsoft and IBM for storing audio on PCs. It is a variation of the Resource Interchange File Format (RIFF), which is a general format for storing data in tagged chunks. This structure allows WAV files to store various types of data, but their primary use is for audio.

The Most Common Format: Uncompressed LPCM

As stated in the reference, the most common audio format found inside a WAV file is uncompressed audio using the Linear Pulse-Code Modulation (LPCM) format.

  • LPCM is a method of digitally representing sampled analog signals. It does this by taking measurements (samples) of the audio signal at regular intervals and recording the amplitude (volume) of each sample as a digital value.
  • This is the standard audio coding format for audio CDs, which store two-channel LPCM audio sampled at 44.1 kHz with 16 bits per sample. This means that for every second of audio, 44,100 samples are taken, and each sample's amplitude is recorded with 16 bits of precision.

Other Possibilities: Compressed Audio

While LPCM is prevalent, a WAV file can contain compressed audio. This is less common than the uncompressed format but possible using various audio codecs. However, the format's strength and typical use case lie in storing high-quality, uncompressed audio.

Structure of a WAV File

A WAV file isn't just the audio data; it also contains header information that describes the audio data within. This header tells a media player crucial details about the audio stream, such as:

  • The file type (RIFF, WAV)
  • The size of the file
  • The audio format (e.g., LPCM, or a specific compression format)
  • The number of audio channels (mono, stereo, etc.)
  • The sample rate (samples per second, e.g., 44.1 kHz)
  • The bit depth (bits per sample, e.g., 16 bits)
  • The byte rate and block alignment

Here's a simplified view of the main chunks often found in a standard WAV file:

Chunk ID Description Contents Typically Include...
RIFF RIFF Header File type ('WAVE'), total file size
fmt Format Chunk Audio format (LPCM/compressed), channels, sample rate, etc.
data Data Chunk The actual audio sample data

Why Use Uncompressed WAV?

  • Fidelity: Uncompressed LPCM retains all the original audio information, offering the highest fidelity and dynamic range compared to lossy compressed formats (like MP3).
  • Editing: Ideal for audio editing as no quality is lost during manipulation and saving.
  • Archiving: Often used for archiving original recordings due to its lossless nature.

In summary, while capable of holding compressed audio, the definitive characteristic of a WAV file, especially in its most common form, is its container for high-quality, uncompressed LPCM audio, akin to the standard found on audio CDs.

Related Articles