pub struct StartupSamples { /* private fields */ }Expand description
One generation’s leading microphone validation, before DSP or gain. Confirm 10 ms of valid native frames and replay them from the beginning.
Implementations§
Source§impl StartupSamples
impl StartupSamples
Sourcepub fn new(rate: u32, channels: u16) -> Self
pub fn new(rate: u32, channels: u16) -> Self
Create state for a validated nonzero mono/stereo native format.
Sourcepub fn is_pending(&self) -> bool
pub fn is_pending(&self) -> bool
Whether this generation is still validating its leading samples.
Sourcepub fn dropped_frames(&self) -> u64
pub fn dropped_frames(&self) -> u64
Number of suppressed native frames, including interrupted confirmation windows.
Sourcepub fn dropped_event(&self) -> Option<Event>
pub fn dropped_event(&self) -> Option<Event>
The single report for this generation, also usable on timeout/early shutdown.
Sourcepub fn check_deadline(&self, elapsed: Duration) -> Result<()>
pub fn check_deadline(&self, elapsed: Duration) -> Result<()>
Reject persistent invalid startup at the wall-clock deadline, even without more input.
Sourcepub fn finish(&mut self) -> StartupOutput<'static>
pub fn finish(&mut self) -> StartupOutput<'static>
Finish a generation. A wholly valid short input is released unchanged; an unconfirmed candidate following invalid input is suppressed and counted.
Auto Trait Implementations§
impl Freeze for StartupSamples
impl RefUnwindSafe for StartupSamples
impl Send for StartupSamples
impl Sync for StartupSamples
impl Unpin for StartupSamples
impl UnsafeUnpin for StartupSamples
impl UnwindSafe for StartupSamples
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more