From 23fec2b7dc23478cb6e6ae44388551c2d71c0ac9 Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Tue, 3 Dec 2002 06:38:12 +0000 Subject: [PATCH] flesh out CUESHEET documentation --- doc/html/format.html | 175 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 173 insertions(+), 2 deletions(-) diff --git a/doc/html/format.html b/doc/html/format.html index 28d7078..8b03378 100644 --- a/doc/html/format.html +++ b/doc/html/format.html @@ -243,6 +243,8 @@
  • APPLICATION: This block is for use by third-party applications. The only mandatory field is a 32-bit identifier. This ID is granted upon request to an application by the FLAC maintainers. The remainder is of the block is defined by the registered application. Visit the registration page if you would like to register an ID for your application with FLAC.
  • PADDING: This block allows for an arbitrary amount of padding. The contents of a PADDING block have no meaning. This block is useful when it is known that an APPLICATION block will be added after encoding; the user can instruct the encoder to reserve a PADDING block of the proper size so that the application may directly write over it later (which is relatively quick) instead of having to insert the APPLICATION block (which would normally require rewriting the entire file).
  • SEEKTABLE: This is an optional block for storing seek points. It is possible to seek to any given sample in a FLAC stream without a seek table, but the delay can be unpredictable since the bitrate may vary widely within a stream. By adding seek points to a stream, this delay can be significantly reduced. Each seek point takes 18 bytes, so 1% resolution within a stream adds less than 2k. There can be only one SEEKTABLE in a stream, but the table can have any number of seek points. There is also a special 'placeholder' seekpoint which will be ignored by decoders but which can be used to reserve space for future seek point insertion.
  • +
  • VORBIS_COMMENT: This block is for storing a list of human-readable name/value pairs. Values are encoded using UTF-8. It is an implementation of the Vorbis comment specification. This is the only officially supported tagging mechanism in FLAC.
  • +
  • CUESHEET: This block is for storing various information that can be used in a cue sheet. It supports track and index points, compatible with Red Book CD digital audio discs, as well as other CD-DA metadata such as media catalog number and track ISRCs. The CUESHEET block is especially useful for backing up CD-DA discs, but it can be used as a general purpose cueing mechanism for playback.
  • @@ -393,7 +395,7 @@ 4 : VORBIS_COMMENT
  • - 4 : CUESHEET + 5 : CUESHEET
  • 6-127 : reserved @@ -423,7 +425,12 @@ - METADATA_BLOCK_STREAMINFO
    || METADATA_BLOCK_PADDING
    || METADATA_BLOCK_APPLICATION
    || METADATA_BLOCK_SEEKTABLE
    || METADATA_BLOCK_VORBIS_COMMENT + METADATA_BLOCK_STREAMINFO
    + || METADATA_BLOCK_PADDING
    + || METADATA_BLOCK_APPLICATION
    + || METADATA_BLOCK_SEEKTABLE
    + || METADATA_BLOCK_VORBIS_COMMENT
    + || METADATA_BLOCK_CUESHEET The block data must match the block type in the block header. @@ -688,6 +695,170 @@

    + + + + + + + + + + + + + + + + + + + + + + + + +
    + METADATA_BLOCK_CUESHEET +
    + <128*8> + + Media catalog number, in ASCII printable characters 0x20-0x7e. In general, the media catalog number may be 0 to 128 bytes long; any unused characters should be right-padded with NUL characters. For CD-DA, this is a thirteen digit number, followed by 115 NUL bytes. +
    + <64> + + The number of lead-in samples. This field has meaning only for CD-DA cuesheets; for other uses it should be 0. For CD-DA, the lead-in is the TRACK 00 area where the table of contents is stored; more precisely, it is the number of samples from the first sample of the media to the first sample of the first index point of the first track. According to the Red Book, the lead-in must be silence and CD grabbing software does not usually store it; additionally, the lead-in must be at least two seconds but may be longer (? @@@@). For these reasons the lead-in length is stored here so that the absolute position of the first track can be computed. Note that the lead-in stored here is the number of samples up to the first index point of the first track, not necessarily to INDEX 01 of the first track; even the first track may have INDEX 00 data. +
    + <259*8> + + Reserved. All bits must be set to zero. +
    + <8> + + The number of tracks. For CD-DA, this number must be no more than 100 (99 regular tracks and one leadout track). +
    + CUESHEET_TRACK+ + + One or more tracks. A CUESHEET block is required to have a lead-out track; it is always the last track in the CUESHEET. For CD-DA, the lead-out track number must be 170 as specified by the Red Book (? @@@@). +
    +
    +

    + +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + CUESHEET_TRACK +
    + <64> + + Track offset in samples, relative to the beginning of the FLAC audio stream. It is the offset to the first index point of the track. (Note how this differs from CD-DA, where the track's offset in the TOC is that of the track's INDEX 01 even if there is an INDEX 00.) For CD-DA, the offset must be evenly divisible by 588 samples (588 samples = 44100 samples/sec * 1/75th of a sec). +
    + <8> + + Track number. A track number of 0 is not allowed to avoid conflicting with the CD-DA spec, which reserves this for the lead-in. For CD-DA the number must be 1-99, or 170 for the lead-out (? @@@@). It is not required but encouraged to start with track 1 and increase sequentially (? @@@@). Track numbers must be unique within a CUESHEET. +
    + <12*8> + + Track ISRC. This is a 12-digit alphanumeric code; see here and here. A value of 12 ASCII NUL characters may be used to denote absence of an ISRC. +
    + <1> + + The track type: 0 for audio, 1 for non-audio. This corresponds to the CD-DA Q-channel control bit 3. +
    + <1> + + The pre-emphasis flag: 0 for no pre-emphasis, 1 for pre-emphasis. This corresponds to the CD-DA Q-channel control bit 5; see here. +
    + <6+13*8> + + Reserved. All bits must be set to zero. +
    + <8> + + The number of track index points. There must be at least one index in every track in a CUESHEET except for the lead-out track, which must have zero. For CD-DA, this number may be no more than 100. +
    + CUESHEET_TRACK_INDEX+ + + One or more track index points. +
    +
    +

    + +

    +
    + + + + + + + + + + + + + + + + +
    + CUESHEET_TRACK_INDEX +
    + <64> + + Offset in samples, relative to the track offset, of the index point. For CD-DA, the offset must be evenly divisible by 588 samples (588 samples = 44100 samples/sec * 1/75th of a sec). Note that the offset is from the beginning of the track, not the beginning of the audio data. +
    + <8> + + Index point number. The first index in a track must have a number of 0 or 1, and subsequently, index numbers must increase by 1. Index numbers must be unique within a track. +
    + <3*8> + + Reserved. All bits must be set to zero. +
    +
    +

    + +

    +
    -- 2.7.4