Wave Audio File Format


If you have ever encountered digital audio - be it a studio recording, digitized vinyl, or just a .wav file on an old disk - you have already encountered the WAV format. It appeared in the early 90s, but still remains one of the most popular audio formats in the professional environment. Why is this? Because WAV is a standard that guarantees maximum quality, simple structure, and full compatibility.

But behind this simplicity lie interesting features, limitations, and even rare bugs that few people know about. Let's figure out what WAV actually is, what can be inside it, and why it sometimes suddenly stops working.


What is the WAV format?

WAV is a digital audio storage container developed by Microsoft and IBM in 1991. The full name is Waveform Audio File Format. It is based on the more general RIFF (Resource Interchange File Format) format and is a close relative of the AIFF format on MacOS.

The WAV format has become a standard for Windows and has quickly spread throughout the music industry due to its simplicity. In general, it is a 44-byte header followed by a set of uncompressed samples. Even a damaged file can be easily imported into a sound editor using the raw sample import. That is, if you see a WAV file, you can be 99% sure that you are looking at the original signal, recorded without compression.

However, it is important to understand: WAV is not always “raw” sound. It is just a wrapper that can contain different types of compression. For example, a WAV file can contain:

  • Uncompressed PCM audio (the most common case)
  • Compressed audio using codecs, such as GSM 6.10, ADPCM or even MP3 (although this is extremely rare)
  • Multi-channel audio (up to 32 channels, according to the specification)

So WAV is not about quality per se, but about the ability to accurately reproduce the original signal.


How WAV is built: chunks and metadata

WAV is a chunk-based format. Each chunk is a block of data that contains specific information. The main chunk is called fmt, and it stores file parameters: the number of channels, sampling frequency, bit rate, encoding type, etc. The second key chunk is data, where the sound itself is located.

But WAV can also contain other chunks. For example:

  • fact — additional data, such as the number of frames.
  • cue — marks for navigating through the track.
  • playlist — information about loops or repeats.
  • bext — extended metadata, often used in broadcasting: file name, creation date, event description, timestamp, and even GPS coordinates.
  • ixml — detailed technical data, especially popular in the film and TV industry.
  • xmp — XML-based format developed by Adobe for embedding information like title, description, creator, keywords, and date

These chunks make WAV a much more powerful format than it seems at first glance. However, not all programs can read them, and therefore most users do not even suspect the existence of this information.


The 2 GB Limit: Where It Came From and How to Bypass It

One of the most well-known limitations of WAV is the maximum file size of 2 gigabytes. This is due to the fact that the file header initially uses a 32-bit value to indicate the length of the data. Formally, this should be enough for 4 GB, but in Microsoft's specifications this number is signed, which means 1 bit is lost. With a sampling frequency of 44.1 kHz and a depth of 16 bits, it turns out that a file can last a little more than an hour, after which the limit is reached.

Interestingly, this limitation was relevant back when hard drives were measured in hundreds of megabytes, and the recording duration did not exceed several minutes. Today, it seems archaic, especially in the field of sound recording, where long uncompressed files are needed.

To bypass this limitation, an extended format was created - WAV64 (or D-Cinema WAV), which uses 64-bit fields. There is also the RF64 format, which maintains compatibility with WAV, but allows you to work with files up to several terabytes in size.

However, these formats are not supported by all programs, and if you open such a file in an old player, it may simply not start or show an error.


Little-known facts and oddities of WAV

Over almost three decades of existence, the format has managed to accumulate several interesting features:

  • MP3 inside WAV: yes, some WAV files contain compressed audio in MPEG Layer III format. Such files are most often created on Windows, where when choosing the WAV format, you can use any system codec via ACT. This is how our multichannel audio logger works.
  • File length bug: some programs ignore real data when reading WAV files and only rely on the header. If the file was cut, but the header remained intact, the player may try to play non-existent data, causing noise or freezing.
  • Endianness: WAV files are usually created in little-endian format, but theoretically they can be big-endian. Previously, this was not a problem, but with the release of the Windows version for ARM processors, some software may not work correctly.
  • Multichannel sound: In the file header, the number of channels is stored in a 16-bit field, which means the maximum value can be 65535. However, a maximum of 32 channels is officially supported. The fact is that the length of the mask indicating the purpose of a separate channel is 32-bit in the extended version of the header. However, this is quite enough for any surround sound systems.

Why use WAV today?

Today, WAV remains relevant primarily in the professional field:

  • In recording studios, where an uncompressed original is needed.
  • In radio and TV, where precise time matching and high quality are required.
  • When working with samples and loops, where precise synchronization is important.
  • For storing audio with extended metadata (bext, iXML).

For everyday listening, WAV only makes sense if you want maximum quality without loss. In other cases, it is better to use formats with efficient compression, such as FLAC, ALAC, OPUS or MP3.


Summary

The WAV format is more than just a file with high-quality audio. It is a flexible and powerful container that can store not only the audio itself, but also rich metadata, tags, technical information and even multi-channel content.

Its limitations, such as the maximum size of 2 GB, have long been overcome by modern formats, but WAV remains the standard to turn to when you need guaranteed accuracy and compatibility.

So next time you see a file with the .wav extension, do not rush to think that it is simply “high quality”. There may be a whole world of data hidden inside that you don't even know about.


Related topics: