TrackCDDA

Type Alias TrackCDDA 

Source
pub type TrackCDDA = Track<CDDAOffset, NonZero<u8>, IndexVec<100, CDDAOffset>>;
Expand description

A CD-DA CUESHEET track

Aliased Type§

pub struct TrackCDDA {
    pub offset: CDDAOffset,
    pub number: NonZero<u8>,
    pub isrc: ISRC,
    pub non_audio: bool,
    pub pre_emphasis: bool,
    pub index_points: IndexVec<100, CDDAOffset>,
}

Fields§

§offset: CDDAOffset

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: NonZero<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: IndexVec<100, CDDAOffset>

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

Trait Implementations§

Source§

impl FromBitStream for TrackCDDA

Source§

type Error = Error

Error generated during parsing, such as io::Error
Source§

fn from_reader<R: BitRead + ?Sized>(r: &mut R) -> Result<Self, Self::Error>

Parse Self from reader
Source§

impl ToBitStream for TrackCDDA

Source§

type Error = Error

Error generated during building, such as io::Error
Source§

fn to_writer<W: BitWrite + ?Sized>(&self, w: &mut W) -> Result<(), Self::Error>

Generate self to writer
Source§

fn bits<C>(&self) -> Result<C, Self::Error>
where C: Counter, Self: Sized,

Returns length of self in bits, if possible
Source§

fn bits_len<C, E>(&self) -> Result<C, Self::Error>
where C: Counter, E: Endianness, Self: Sized,

👎Deprecated since 4.0.0: use of bits() is preferred
Returns total length of self, if possible