The cue chunk (with a trailing space) marks positions in the audio, such
as the start of each take or a point to jump to. Each marker has a numeric ID; text for
it is kept separately in a LIST adtl chunk, and a
plst chunk can give an order to play them in. All three come from the 1991
specification, and in a RIFX file every number in them is big-endian.
Fields
Offsets are from the start of the chunk. Numbers are big-endian.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | char[4] | ckID | cue |
| 4 | 4 | u32 | ckSize | 4 + 24 × the number of cue points |
| 8 | 4 | u32 | dwCuePoints | the number of cue points |
| 12 | 24 each | record | points | the cue points, laid out below |
The explorer reports a count larger than the chunk can hold.
Cue point
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | u32 | dwName | the cue point’s ID, unique in the file |
| 4 | 4 | u32 | dwPosition | “the sequential sample number within the play order”, in frames |
| 8 | 4 | char[4] | fccChunk | the chunk holding the sample: data, or slnt in a wave list; four characters, not a number, so not swapped |
| 12 | 4 | u32 | dwChunkStart | with a wave list, the offset of that chunk within it; 0 with a single data chunk |
| 16 | 4 | u32 | dwBlockStart | for compressed data, the offset of the block holding the sample; 0 for PCM |
| 20 | 4 | u32 | dwSampleOffset | the sample frame within that block or chunk |
In a plain PCM file with one data chunk, dwPosition and
dwSampleOffset both hold the frame number of the marker.
Labels, notes and regions
Text for the cue points goes in a LIST chunk with the list type
adtl (associated data list), which holds one small chunk per piece of
text, each padded to an even length:
| Chunk | Holds |
|---|---|
labl | dwName (u32), the cue point’s ID, then a NUL-terminated label |
note | dwName (u32), then a NUL-terminated comment |
ltxt | a region, laid out below |
file | dwName (u32), dwMedType (a four-character media type), then the data of an embedded file |
An ltxt chunk turns a marker into a region of a given length:
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | u32 | dwName | the cue point the region starts at |
| 4 | 4 | u32 | dwSampleLength | the region’s length in frames |
| 8 | 4 | char[4] | dwPurpose | what the text is for: the specification’s examples are scrp (script) and capt (caption); rgn is used for regions |
| 12 | 2 | u16 | wCountry | country code, 0 for none |
| 14 | 2 | u16 | wLanguage | language code |
| 16 | 2 | u16 | wDialect | dialect code |
| 18 | 2 | u16 | wCodePage | the code page of the text |
| 20 | varies | char[] | text | the text, if any |
The explorer joins each cue point with its label, note and region in one table.
Playlist
A plst chunk gives an order to play parts of the audio in, starting at cue
points:
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | u32 | dwSegments | the number of segments |
| 4 | 12 each | record | segments | each dwName (u32, a cue point), dwLength (u32, in samples) and dwLoops (u32, times to play it) |