#[non_exhaustive]pub struct Observation {
pub clock: Duration,
pub latency: Option<Duration>,
pub quanta: u64,
pub quiet: u64,
pub comfort: Duration,
pub skips: u64,
pub trimmed: Duration,
pub accelerated: Duration,
pub stalled: bool,
pub gaps: Vec<Gap>,
pub stalls: Vec<Stall>,
}Expand description
What an Observer has seen: running totals, and the events since the last read.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.clock: DurationDevice time rendered since the engine opened: frames pulled over the device rate. The clock every other timestamp here is on.
latency: Option<Duration>How far the last buffer was handed over ahead of the speaker, as the
host reports it. None until a host reports one.
quanta: u64Quanta rendered since the first audible one.
quiet: u64Of those, the quanta under -60 dBFS, whatever the cause.
comfort: DurationDevice time filled with comfort noise for a silence the publisher declared, since the first audible quantum.
skips: u64Times a sink being written had its queue trimmed back to its latency.
trimmed: DurationWritten audio discarded unplayed to bring a sink’s queue back down to its latency, summed over the sinks being written. A sink’s opening silence and comfort noise never count; silence the writer wrote does.
accelerated: DurationMedia a sink’s time stretch removed by playing faster, summed over the sinks being written. Inaudible by design, unlike a trim.
stalled: boolWhether nothing is playing: no sink is being written to, or every one still waits for its first samples.
gaps: Vec<Gap>Gaps that closed since the last read. One still open is reported once a
full quantum ends it, or once Observer::finish resolves.
stalls: Vec<Stall>Changes in stalled since the last read.
Trait Implementations§
Source§impl Clone for Observation
impl Clone for Observation
Source§impl Debug for Observation
impl Debug for Observation
Source§impl Default for Observation
impl Default for Observation
impl Eq for Observation
Source§impl PartialEq for Observation
impl PartialEq for Observation
impl StructuralPartialEq for Observation
Auto Trait Implementations§
impl Freeze for Observation
impl RefUnwindSafe for Observation
impl Send for Observation
impl Sync for Observation
impl Unpin for Observation
impl UnsafeUnpin for Observation
impl UnwindSafe for Observation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.