Struct cue::track::Track [] [src]

pub struct Track { /* fields omitted */ }

The Track struct represents a single track within a CD. A track can be one of several types, represented by the TrackMode struct, and a CD can mix and match tracks of different types in arbitrary orders.

The CUE sheet format represents its time codes in a MM:SS:FR format, which is based on the MIN, SEC and FRAC fields defined by the CD standard. FRAC is a fraction representing 1/75th of a second, which is the size of a single CD sector. The timecodes returned by this struct have been parsed into sequential sector counts.

Aside from the track itself, this struct also represents the regions immediately before and after the track. These regions of a disc, known as the pregap and postgap, are not contained within any track but do have their own timecodes. They are usually silent but occasionally contain sound as a form of easter egg.

The order content looks like this:

  • Pregap (if present)
  • Track
  • Postgap (if present)
  • Next track's pregap (if present) ...

Aside from the pregap and postgap, a track can consist of up to 99 indices, where the start of the track is index 01. Indices higher than 1 are very rarely used, and this struct currently doesn't support representing them.

Methods

impl Track
[src]

[src]

[src]

Returns the filename of the file containing this track. The track might be stored standalone in its own file, or as part of a large file containing the contents of the entire disc.

[src]

Returns the start address of this track in sectors.

[src]

Returns the length of this track in sectors.

[src]

Returns the mode of this track as a TrackMode variant.

[src]

Returns a TrackSubMode variant indicating whether the format of subchannel data provided for this track.

The BIN/CUE format does not normally provide subchannel data, but when it does it provides data for subchannels R through W in either a "raw" or a "cooked" format.

[src]

Queries whether a given TrackFlag is set for the track. These indicate special properties such as whether a track contains data, is copy-protected, contains quadraphonic audio, and so on.

[src]

Returns the length of the track's pregap, in sectors. The pregap is a region contained before the track proper. It almost always consists of two seconds of silence, though it can be any length and contain any data; this is occasionally used for secret tracks.

[src]

Returns the length of the track's postgap, in sectors. Like the pregap, the postgap is a region that comes after the end of a track and before the next one; if present, it almost always consists of silence.

[src]

Returns the International Standard Recording Code (ISRC) for this track, if defined. While some CDs use ISRCs, they are not common and many CUE sheets leave them out even if the CD had them.

[src]

Returns the track number.

[src]

Returns a CDText object containing any CD-TEXT data for this track, if present.

[src]

Returns a REM object containing any comments for this track, if present.

Trait Implementations

Auto Trait Implementations

impl !Send for Track

impl !Sync for Track