pub struct CaptureDiagnostics { /* private fields */ }Expand description
Clone before entering the callback; recording never allocates or locks.
Implementations§
Source§impl CaptureDiagnostics
impl CaptureDiagnostics
Sourcepub fn new(rate: u32, channels: u16) -> Self
pub fn new(rate: u32, channels: u16) -> Self
Configure a handle for one negotiated generation (off callback).
Sourcepub fn record_startup_drop(&self, frames: u64, native_rate: u32)
pub fn record_startup_drop(&self, frames: u64, native_rate: u32)
Publish a microphone startup gap before the first composite Mix samples. Called only by the non-realtime mixer, once per generation.
Sourcepub fn take_startup_drop(&self) -> Option<(u64, u32)>
pub fn take_startup_drop(&self) -> Option<(u64, u32)>
Drain the composite microphone gap once, off callback and before PCM.
Sourcepub fn mark_discontinuity(&self)
pub fn mark_discontinuity(&self)
Mark routing changes without allocating or locking in the native callback.
Sourcepub fn take_discontinuity(&self) -> bool
pub fn take_discontinuity(&self) -> bool
Consume a routing change once, outside realtime callbacks.
Sourcepub fn record_corrupt_buffer(&self, samples: Option<NonZeroU64>)
pub fn record_corrupt_buffer(&self, samples: Option<NonZeroU64>)
Reject a corrupt buffer without trusting invalid metadata for a count.
Sourcepub fn record_malformed_buffer(&self, samples: Option<NonZeroU64>)
pub fn record_malformed_buffer(&self, samples: Option<NonZeroU64>)
Reject malformed native buffer layout.
Sourcepub fn record_callback_rejected(&self, samples: Option<NonZeroU64>)
pub fn record_callback_rejected(&self, samples: Option<NonZeroU64>)
Reject a callback whose exclusive state cannot be accessed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CaptureDiagnostics
impl RefUnwindSafe for CaptureDiagnostics
impl Send for CaptureDiagnostics
impl Sync for CaptureDiagnostics
impl Unpin for CaptureDiagnostics
impl UnsafeUnpin for CaptureDiagnostics
impl UnwindSafe for CaptureDiagnostics
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