pub struct AudioPlaybackStats { /* private fields */ }Expand description
Playback statistics for an AudioContext.
The underrun counters are currently based on render callbacks that miss their realtime deadline. Backends that expose device-level underrun counters can feed more precise values into the shared stats layer in the future.
Implementations§
Source§impl AudioPlaybackStats
impl AudioPlaybackStats
Sourcepub fn underrun_duration(&self) -> f64
pub fn underrun_duration(&self) -> f64
Total duration of underrun frames in seconds.
Sourcepub fn underrun_events(&self) -> u64
pub fn underrun_events(&self) -> u64
Number of underrun events.
Sourcepub fn total_duration(&self) -> f64
pub fn total_duration(&self) -> f64
Total playback duration in seconds.
Sourcepub fn average_latency(&self) -> f64
pub fn average_latency(&self) -> f64
Average output latency in seconds since the last latency reset.
Sourcepub fn minimum_latency(&self) -> f64
pub fn minimum_latency(&self) -> f64
Minimum output latency in seconds since the last latency reset.
Sourcepub fn maximum_latency(&self) -> f64
pub fn maximum_latency(&self) -> f64
Maximum output latency in seconds since the last latency reset.
Sourcepub fn reset_latency(&self)
pub fn reset_latency(&self)
Reset the tracked latency interval.
Sourcepub fn to_json(&self) -> AudioPlaybackStatsSnapshot
pub fn to_json(&self) -> AudioPlaybackStatsSnapshot
Return the currently exposed values as a plain Rust snapshot.
Trait Implementations§
Source§impl Clone for AudioPlaybackStats
impl Clone for AudioPlaybackStats
Source§fn clone(&self) -> AudioPlaybackStats
fn clone(&self) -> AudioPlaybackStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AudioPlaybackStats
impl RefUnwindSafe for AudioPlaybackStats
impl Send for AudioPlaybackStats
impl Sync for AudioPlaybackStats
impl Unpin for AudioPlaybackStats
impl UnsafeUnpin for AudioPlaybackStats
impl UnwindSafe for AudioPlaybackStats
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