pub struct TruePeakDetector { /* private fields */ }Expand description
True peak detector using 4x polyphase FIR oversampling.
The FIR follows libebur128’s 49-tap Hanning-windowed sinc polyphase interpolator shape. It replaces the older cubic interpolation estimate with a bounded, no-heap process path. Formal BS.1770 conformance still depends on validating against reference corpus data.
This is used for measurement, not limiting. The limiter above handles peak limiting without oversampling (acceptable for most use cases).
Implementations§
Source§impl TruePeakDetector
impl TruePeakDetector
pub fn new() -> Self
Sourcepub fn process_strided(&mut self, samples: &[f64], offset: usize, stride: usize)
pub fn process_strided(&mut self, samples: &[f64], offset: usize, stride: usize)
Process one channel from an interleaved buffer without allocating.
Sourcepub fn max_true_peak(&self) -> f64
pub fn max_true_peak(&self) -> f64
Get maximum true peak detected (linear)
Sourcepub fn max_true_peak_db(&self) -> f64
pub fn max_true_peak_db(&self) -> f64
Get maximum true peak in dBTP
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TruePeakDetector
impl RefUnwindSafe for TruePeakDetector
impl Send for TruePeakDetector
impl Sync for TruePeakDetector
impl Unpin for TruePeakDetector
impl UnsafeUnpin for TruePeakDetector
impl UnwindSafe for TruePeakDetector
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more