A .au (also .snd) file is the header that gave raw PCM a way to describe itself -- the self-describing form that came before RIFF. A fixed 24-byte big-endian header -- magic, the offset where audio begins, its size, an encoding code, a sample rate and a channel count -- then an optional annotation string, then the samples. It is where the ".snd" magic and the G.711 companded codecs of early Unix and NeXT workstations were written down, and it is deliberately minimal: everything a decoder needs sits in six 32-bit fields. Both maps below are drawn byte by byte from a real header. Hover a field to light its bytes, click a field with a + for its table. Color marks kind (see the key).
There is no chunk grid and no table of pointers: a .au file is a fixed 24-byte header, an optional annotation (a comment sized by the data offset), then the audio. Six big-endian 32-bit words say everything -- where the audio starts, how big it is, which codec it uses, the rate, and the channel count. The header below is drawn from a real 16-bit linear-PCM file.
.au later carries as encoding 1 and 27, decades before the container existed..snd/.au header appears across SunOS and NeXTSTEP, big-endian for the 68k and SPARC machines it was born on -- the mirror image of the RIFF/Intel world that followed..au became a common sound for Java applets and early embedded web audio; javax.sound reads it to this day.data_size of 0xFFFFFFFF does not mean four gigabytes of audio -- it is the length-not-known marker of a stream written before its own length was. The real size is whatever bytes follow the header. Treating the literal 4294967295 as a byte count is the first way to get this format wrong.The whole header is six big-endian 32-bit words. After the magic come data_offset (where the audio begins, which also sizes any annotation between), data_size (byte length, or the unknown sentinel), the encoding code, the sample_rate, and the channels. The map is a real 16-bit linear-PCM header at 44100 Hz, mono.
Example: 16-bit linear PCM, 44100 Hz, mono. Hover the encoding for the code table.
data_offset, so a header with no comment sets it to exactly 24. The floor is 24; anything smaller points inside the header itself, which acidcat reports as a warning rather than trusting.encoding code -- there is no separate bits field. A reader that wants sample width looks the code up; it does not read it. Here encoding 3 means 16-bit signed linear PCM.The same 24-byte header, written as a stream: the data_size is the 0xFFFFFFFF sentinel, so the real length is whatever follows, and the encoding is mu-law -- the G.711 telephone codec, eight bits and companded, not linear PCM. These are the two fields a naive reader misreads. Hover the amber ones.
Example: mu-law, 8000 Hz, mono, unknown length. The two amber fields are the traps.
1 (mu-law) and 27 (A-law) are the G.711 companding curves -- a non-linear 8-bit mapping that folds roughly 14 bits of dynamic range into a byte for telephony. They are named and flagged, not passed off as samples: fed to a linear PCM player they play as loud noise. Decoding them back to linear PCM is a one-table lookup, which is what the convert path does..snd extension -- the Akai MPC2000 sound -- but it has no ".snd" magic (it opens 0x01 0x02), so it is told apart from this one by content at sniff time and walks under the id snd.