AUDIO
Source snapshot · 12 October 2026

API reference / ravet_signal::TruePeakMeter64

Struct TruePeakMeter64 

pub struct TruePeakMeter64 { /* private fields */ }
Expand description

Single-channel convenience owner. All counters and finalization match the bank.

use ravet_signal::{TruePeakDesign, TruePeakFactor, TruePeakMeter64};
let profile = TruePeakDesign::new(48000, 32, TruePeakFactor::Eight, 12.)?;
let mut meter = TruePeakMeter64::new(&profile, 67)?;
meter.observe_f32(&[0.5, -0.5])?;
meter.finish(); // Explicitly after stopped source ownership.
let reading = meter.reading();
assert_eq!(reading.source_frames, 2);
assert_eq!(reading.tail_frames, 64);
assert!(reading.interpolated_peak >= reading.sample_peak);

Implementations§

§

impl TruePeakMeter64

pub fn new( design: &TruePeakDesign, maximum_frames: usize, ) -> Result<Self, TruePeakError>

pub fn design(&self) -> &TruePeakDesign

pub fn maximum_frames(&self) -> usize

pub fn pending_source_suffix_frames(&self) -> u64

pub fn last_phase_numerator(&self) -> Option<i128>

pub fn observe_sample(&mut self, input: f64) -> Result<(), TruePeakError>

pub fn observe(&mut self, input: &[f64]) -> Result<(), TruePeakError>

pub fn observe_f32(&mut self, input: &[f32]) -> Result<(), TruePeakError>

pub fn reading(&self) -> TruePeakReading64

pub fn finish(&mut self)

pub fn reset(&mut self)

Trait Implementations§

§

impl Debug for TruePeakMeter64

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.