TrackGeneric

Type Alias TrackGeneric 

Source
pub type TrackGeneric = Track<u64, Option<u8>, Vec<Index<u64>>>;
Expand description

A Generic track suitable for display

The lead-out track has a track number of None.

Aliased Type§

pub struct TrackGeneric {
    pub offset: u64,
    pub number: Option<u8>,
    pub isrc: ISRC,
    pub non_audio: bool,
    pub pre_emphasis: bool,
    pub index_points: Vec<Index<u64>>,
}

Fields§

§offset: u64

Offset of first index point

In samples relative to the beginning of the FLAC audio stream.

For CD-DA, the track offset must always be divisible by 588. This is because for audio CDs, tracks must always begin on CD frame boundaries. Since each CD frame is 1/75th of a second, and CDs have 44,100 samples per second, 44100 ÷ 75 = 588.

Non-CD-DA discs have no such restriction.

§number: Option<u8>

Track number

Disc TypeRangeLead-Out Track
CD-DA1 ≤ track number ≤ 99170
Non-CD-DA1 ≤ track number < 255255
§isrc: ISRC

Track’s ISRC

§non_audio: bool

Whether track is non-audio

§pre_emphasis: bool

Whether track has pre-emphasis

§index_points: Vec<Index<u64>>

Track’s index points

Disc TypeLead-Out TrackIndex Points
CD-DANonot more than 100
CD-DAYes0
Non-CD-DANonot more than 255
Non-CD-DAYes0