pub struct PlaybackStarter { /* private fields */ }Expand description
Poll-driven CD-DA start handshake (SetMode -> Demute -> Play).
ⓘ
let mut starter = PlaybackStarter::new();
starter.begin(tick); // arms the cold-drive delay
// then, once per tick:
if starter.tick(tick, track) {
// playback accepted this tick; e.g. clock.start(tick)
}Implementations§
Source§impl PlaybackStarter
impl PlaybackStarter
Sourcepub const fn new() -> Self
pub const fn new() -> Self
A starter in the Done state; call PlaybackStarter::begin to arm it.
Sourcepub const fn with_spins(self, spins: u32) -> Self
pub const fn with_spins(self, spins: u32) -> Self
Override the per-command spin budget (emulators answer instantly; silicon wants the default).
Sourcepub const fn with_retry_ticks(self, ticks: u32) -> Self
pub const fn with_retry_ticks(self, ticks: u32) -> Self
Override the delay after a rejected command. Successful steps retain their two-tick controller settling gap.
Sourcepub fn begin_after(&mut self, now_tick: u32, delay: u32)
pub fn begin_after(&mut self, now_tick: u32, delay: u32)
Arm with an explicit initial delay (zero for an already warm drive).
Sourcepub fn begin(&mut self, now_tick: u32)
pub fn begin(&mut self, now_tick: u32)
Arm the handshake: first command fires COLD_DRIVE_DELAY_TICKS
after now_tick.
Sourcepub fn has_started(&self) -> bool
pub fn has_started(&self) -> bool
Whether Play has been accepted (the handshake is finished).
Trait Implementations§
Source§impl Clone for PlaybackStarter
impl Clone for PlaybackStarter
Source§fn clone(&self) -> PlaybackStarter
fn clone(&self) -> PlaybackStarter
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PlaybackStarter
impl Debug for PlaybackStarter
Source§impl Default for PlaybackStarter
impl Default for PlaybackStarter
impl Copy for PlaybackStarter
Auto Trait Implementations§
impl Freeze for PlaybackStarter
impl RefUnwindSafe for PlaybackStarter
impl Send for PlaybackStarter
impl Sync for PlaybackStarter
impl Unpin for PlaybackStarter
impl UnsafeUnpin for PlaybackStarter
impl UnwindSafe for PlaybackStarter
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
Mutably borrows from an owned value. Read more
§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)
🔬This is a nightly-only experimental API. (
clone_to_uninit)