pub struct PlayPosition {
pub track: u8,
pub index: u8,
pub relative_min: u8,
pub relative_sec: u8,
pub relative_frame: u8,
pub absolute_min: u8,
pub absolute_sec: u8,
pub absolute_frame: u8,
}Expand description
Decoded CdlGetlocP reply. The relative MSF (relative_*) is elapsed time
into the current track, independent of the pregap, which makes it the source
of truth for a music/song clock. The absolute MSF (absolute_*) is the raw
disc position.
Fields§
§track: u81-based track number the drive is currently in.
index: u8Track index (raw): 0 = pregap, 1 = program area.
relative_min: u8Minutes elapsed into the current track.
relative_sec: u8Seconds elapsed into the current track (0..=59).
relative_frame: u8MSF frames elapsed into the current track (0..=74, 75 per second).
absolute_min: u8Absolute disc position, minutes.
absolute_sec: u8Absolute disc position, seconds (0..=59).
absolute_frame: u8Absolute disc position, MSF frames (0..=74).
Implementations§
Source§impl PlayPosition
impl PlayPosition
Sourcepub fn parse(resp: &Response) -> Option<Self>
pub fn parse(resp: &Response) -> Option<Self>
Parse a GetlocP Response. Returns None if fewer than 8 bytes came
back (drive not ready / no disc). Track and MSF fields are BCD; index is
raw.
Sourcepub fn relative_sectors(&self) -> u32
pub fn relative_sectors(&self) -> u32
Elapsed sectors into the current track (75 sectors per second).
Sourcepub fn relative_millis(&self) -> u32
pub fn relative_millis(&self) -> u32
Elapsed milliseconds into the current track. This is the song clock feed.
Trait Implementations§
Source§impl Clone for PlayPosition
impl Clone for PlayPosition
Source§fn clone(&self) -> PlayPosition
fn clone(&self) -> PlayPosition
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PlayPosition
impl Debug for PlayPosition
Source§impl PartialEq for PlayPosition
impl PartialEq for PlayPosition
impl Copy for PlayPosition
impl Eq for PlayPosition
impl StructuralPartialEq for PlayPosition
Auto Trait Implementations§
impl Freeze for PlayPosition
impl RefUnwindSafe for PlayPosition
impl Send for PlayPosition
impl Sync for PlayPosition
impl Unpin for PlayPosition
impl UnsafeUnpin for PlayPosition
impl UnwindSafe for PlayPosition
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)