Skip to main content

assert_peak_below

Function assert_peak_below 

Source
pub fn assert_peak_below<P: PluginExport>(
    result: &DriverResult<P>,
    threshold: f32,
)
Expand description

Assert no sample exceeds threshold in absolute value. Typical use: assert_peak_below(&result, 1.0) to catch clipping.

§Panics

Panics if any sample’s absolute value exceeds threshold.