pub struct Snapshot { /* private fields */ }Expand description
A point-in-time view of the analyzer’s measurements.
Returned from Analyzer::snapshot.
All accessors return Option<f64>:
Some(value)when the requested mode was selected at build time and enough audio has been ingested for that measurement.Nonewhen the mode wasn’t selected, or there isn’t enough data yet (for example, less than 400 ms of audio has been pushed for momentary loudness).
Implementations§
Source§impl Snapshot
impl Snapshot
Sourcepub fn momentary_lufs(&self) -> Option<f64>
pub fn momentary_lufs(&self) -> Option<f64>
Momentary loudness (sliding 400 ms window) in LUFS.
Sourcepub fn short_term_lufs(&self) -> Option<f64>
pub fn short_term_lufs(&self) -> Option<f64>
Short-term loudness (sliding 3 s window) in LUFS.
Sourcepub fn integrated_lufs(&self) -> Option<f64>
pub fn integrated_lufs(&self) -> Option<f64>
Integrated (gated) loudness over the audio pushed so far, in LUFS.
Computing this involves a pass over the programme buffer; the analyzer caches the result and invalidates the cache when new audio is pushed, so polling at ~10 Hz from a real-time monitor is safe.
Sourcepub fn true_peak_dbtp(&self) -> Option<f64>
pub fn true_peak_dbtp(&self) -> Option<f64>
Maximum true-peak observed so far, in dBTP.
Sourcepub fn loudness_range_lu(&self) -> Option<f64>
pub fn loudness_range_lu(&self) -> Option<f64>
Loudness range (95 % − 10 % of doubly-gated short-term values), in LU.
Sourcepub fn programme_duration_seconds(&self) -> f64
pub fn programme_duration_seconds(&self) -> f64
Total duration of audio ingested, in seconds.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Snapshot
impl<'de> Deserialize<'de> for Snapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Snapshot
impl StructuralPartialEq for Snapshot
Auto Trait Implementations§
impl Freeze for Snapshot
impl RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnsafeUnpin for Snapshot
impl UnwindSafe for Snapshot
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