pub struct AudioOutputStatus { /* private fields */ }Expand description
Cloneable, read-only diagnostics that do not keep the output device alive.
Fields are independent atomic observations, not one transactional snapshot. Counters saturate at u64::MAX. Generated samples can be buffered ahead of audible output; they are not a physical playback clock.
Implementations§
Source§impl AudioOutputStatus
impl AudioOutputStatus
Sourcepub fn is_faulted(&self) -> bool
pub fn is_faulted(&self) -> bool
Reports whether any backend stream error has occurred, including underrun.
Errors are sticky diagnostics; this adapter neither reconnects nor replays the source. The application decides whether to stop or reopen output.
Sourcepub fn stream_error_count(&self) -> u64
pub fn stream_error_count(&self) -> u64
Returns the number of asynchronous backend error callbacks observed.
Callbacks only update this counter; they do not print or retain allocating backend error messages. Setup failures remain detailed typed errors.
Sourcepub fn generated_sample_count(&self) -> u64
pub fn generated_sample_count(&self) -> u64
Returns mono samples pulled from the source, including sanitized samples.
Each sample represents one source/output frame, independently of output channel count. Silence yielded while stopped also advances this counter; an application transport must maintain its own musical position.
Sourcepub fn invalid_sample_count(&self) -> u64
pub fn invalid_sample_count(&self) -> u64
Returns samples replaced or clamped because they were invalid PCM.
Non-finite values become silence; finite values outside -1.0 through 1.0 are clamped. Exact endpoints and signed zero are valid samples.
Sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Reports that the source returned None, which permanently ends that source.
This does not mean buffered samples have reached the speakers. Dropping playback before source exhaustion closes output without marking finished.
Trait Implementations§
Source§impl Clone for AudioOutputStatus
impl Clone for AudioOutputStatus
Auto Trait Implementations§
impl Freeze for AudioOutputStatus
impl RefUnwindSafe for AudioOutputStatus
impl Send for AudioOutputStatus
impl Sync for AudioOutputStatus
impl Unpin for AudioOutputStatus
impl UnsafeUnpin for AudioOutputStatus
impl UnwindSafe for AudioOutputStatus
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.