pub struct AudioPlaybackStats {
pub rendition: String,
pub buffered: Duration,
pub peak: f32,
pub rms: Option<f32>,
pub frames: u64,
}Expand description
The audio decoder.
Fields§
§rendition: StringThe rendition playing.
buffered: DurationHow much audio is queued ahead of the speaker.
peak: f32The most recent peak level on a linear 0.0..=1.0 scale, for a meter.
With a speaker, this is the speaker stream’s peak after the volume.
Without one, it is the peak of the audio rms spans.
It reads 0.0 once rms reads None.
rms: Option<f32>The RMS level of the last 100 ms of decoded audio, on a linear 0.0..=1.0 scale.
Measured before the speaker’s volume, with or without a speaker, so a
player in AudioMode::Decode can drive a level meter or a speaking
indicator. None before the first frame, and after 300 ms without one.
frames: u64Frames played since the player started.
Trait Implementations§
Source§impl Clone for AudioPlaybackStats
impl Clone for AudioPlaybackStats
Source§impl Debug for AudioPlaybackStats
impl Debug for AudioPlaybackStats
Source§impl Default for AudioPlaybackStats
impl Default for AudioPlaybackStats
Source§impl PartialEq for AudioPlaybackStats
impl PartialEq for AudioPlaybackStats
impl StructuralPartialEq for AudioPlaybackStats
Auto 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