CUESHEET is block type 5. It stores a cue sheet: a list of tracks and their index points, by sample number. It can describe a Compact Disc exactly, so a rip stored as one FLAC file can still be split or burned track for track. Offsets on a CD fall on multiples of 588 samples, one CD sector of 1/75 of a second at 44,100 Hz.
Header
| Size | Field | Meaning |
|---|---|---|
| 128 bytes | Media catalogue number | ASCII, padded with zero bytes. For a CD it is the 13-digit UPC or EAN |
| 8 bytes | Lead-in samples | For CD-DA, the number of samples in the lead-in; otherwise 0 |
| 1 bit | CD-DA flag | 1 when the cue sheet is a Compact Disc’s |
| 2079 bits | Reserved | Zero. With the flag, this is 260 bytes |
| 1 byte | Track count | At least 1, because the lead-out counts; at most 100 for CD-DA |
Tracks
Each track is 36 bytes, then its index points. The last track is the lead-out, which marks the end of the audio and has no index points.
| Size | Field | Meaning |
|---|---|---|
| 8 bytes | Offset | From the start of the stream, in samples |
| 1 byte | Track number | 0 is forbidden. CD-DA uses 1 to 99, and 170 for the lead-out; otherwise the lead-out is 255 |
| 12 bytes | ISRC | International Standard Recording Code in ASCII; all zeros means none |
| 1 bit | Type | 0 audio, 1 non-audio |
| 1 bit | Pre-emphasis | 1 when the track has pre-emphasis |
| 110 bits | Reserved | Zero |
| 1 byte | Index point count | 0 for the lead-out |
Index points
| Bytes | Field | Meaning |
|---|---|---|
| 8 | Offset | In samples, relative to the track’s own offset. For CD-DA, a multiple of 588 |
| 1 | Index number | Each one up by one from the last, starting at 0 or 1 |
| 3 | Reserved | Zero |