pub struct WaveformSample {
pub timestamp: Duration,
pub peak_db: f32,
pub rms_db: f32,
}Expand description
A single waveform measurement over a configurable time interval.
Both amplitude values are expressed in dBFS (decibels relative to full
scale). 0.0 dBFS means the signal reached maximum amplitude; values
approach f32::NEG_INFINITY for silence.
Fields§
§timestamp: DurationStart of the time interval this sample covers.
peak_db: f32Peak amplitude in dBFS (max(|s|) over all samples in the interval).
f32::NEG_INFINITY when the interval contains only silence.
rms_db: f32RMS amplitude in dBFS (sqrt(mean(s²)) over all samples).
f32::NEG_INFINITY when the interval contains only silence.
Trait Implementations§
Source§impl Clone for WaveformSample
impl Clone for WaveformSample
Source§fn clone(&self) -> WaveformSample
fn clone(&self) -> WaveformSample
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 moreSource§impl Debug for WaveformSample
impl Debug for WaveformSample
Source§impl PartialEq for WaveformSample
impl PartialEq for WaveformSample
impl StructuralPartialEq for WaveformSample
Auto Trait Implementations§
impl Freeze for WaveformSample
impl RefUnwindSafe for WaveformSample
impl Send for WaveformSample
impl Sync for WaveformSample
impl Unpin for WaveformSample
impl UnsafeUnpin for WaveformSample
impl UnwindSafe for WaveformSample
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