A LIST chunk is a chunk that holds other chunks. With the list type
INFO it holds the file’s text tags: one small chunk per tag, each a
four-letter ID and a string. It comes from the 1991 RIFF specification and works the same
in every RIFF file, not only WAV.
Fields
Offsets are from the start of the chunk. Numbers are little-endian.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | char[4] | ckID | LIST |
| 4 | 4 | u32 | ckSize | the size of everything after this field |
| 8 | 4 | char[4] | listType | INFO for tags, adtl for cue point labels |
| 12 | varies | chunks | tags | tag chunks, laid out below, one after another |
Each tag is a chunk of its own:
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| +0 | 4 | char[4] | ID | the tag, such as INAM |
| +4 | 4 | u32 | size | the length of the text, including its NUL, not counting the pad byte |
| +8 | size | char[] | text | the text, ending in a NUL |
| +8+size | 0 or 1 | u8 | pad | a zero byte when the size is odd |
Text encoding
The specification’s CSET chunk can give the code page, country, language
and dialect of the file’s text; without it the defaults are ISO 8859-1, USA and US
English. Few files carry one. In practice older files use ASCII or the writer’s system
code page, and some current software writes UTF-8. The explorer reads text as UTF-8 when
it is valid UTF-8, and as Windows-1252 otherwise.
An example
00000000 4C 49 53 54 12 00 00 00 49 4E 46 4F 49 4E 41 4D LIST....INFOINAM
00000010 05 00 00 00 53 6F 6E 67 00 00 ....Song..
The tag INAM has a size of 5: the four letters of Song and
the NUL. Five is odd, so a pad byte follows. The list’s size, 18, counts the list type
(4), the tag’s header (8), its text (5) and the pad byte (1).