pub enum TrackBounds {
SessionGap,
Gapless,
}Expand description
Policy for deriving a track’s half-open sector range from a Toc.
A track begins at its own Track::start_lba.
Normally it ends at the next track’s start_lba, or at
Toc::leadout_lba when it is the final track.
§CD-Extra session gaps
A CD-Extra disc places a standard 11,400-sector inter-session gap between
its final audio track and the following data session. This is 152 seconds,
or 2 minutes 32 seconds. In a geometry-preserving address space, the first
data track’s start_lba lies after that gap, so treating it as the audio
track’s end would incorrectly include the gap in the audio range.
Some image formats and extracts remove the inter-session gap and store the
tracks back-to-back. In that layout, the next track’s start_lba is already
the correct end of the audio track; subtracting 11,400 sectors would instead
truncate 152 seconds of audio.
This policy affects only the last audio track followed exclusively by data tracks. All other tracks have identical bounds under both variants.
Choose the variant according to the address space represented jointly by the
backing and its Toc:
SessionGapfor a physical disc or an image that preserves the disc’s original sector geometry.Gaplessfor a contiguous, gap-stripped image or extract.
Gapless refers only to the CD-Extra inter-session gap. It does not remove
ordinary track pregaps or provide gapless playback.
read_track and open_track_stream use SessionGap
by default. Use read_track_with_bounds or
open_track_stream_with_bounds when the source requires an explicit
policy.
Variants§
SessionGap
The address space includes the CD-Extra inter-session gap.
When applicable, the final audio track ends 11,400 sectors before the following data track.
Gapless
The address space stores tracks contiguously without the CD-Extra inter-session gap.
Every track ends at the next track’s start, or at the lead-out.
Trait Implementations§
Source§impl Clone for TrackBounds
impl Clone for TrackBounds
Source§fn clone(&self) -> TrackBounds
fn clone(&self) -> TrackBounds
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more