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: u64Offset 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 Type | Range | Lead-Out Track |
|---|---|---|
| CD-DA | 1 ≤ track number ≤ 99 | 170 |
| Non-CD-DA | 1 ≤ track number < 255 | 255 |
isrc: ISRCTrack’s ISRC
non_audio: boolWhether track is non-audio
pre_emphasis: boolWhether track has pre-emphasis
index_points: Vec<Index<u64>>Track’s index points
| Disc Type | Lead-Out Track | Index Points |
|---|---|---|
| CD-DA | No | not more than 100 |
| CD-DA | Yes | 0 |
| Non-CD-DA | No | not more than 255 |
| Non-CD-DA | Yes | 0 |