Skip to main content

k_weighting_coeffs

Function k_weighting_coeffs 

Source
pub fn k_weighting_coeffs(sample_rate: f32) -> (BiquadCoeffs, BiquadCoeffs)
Expand description

Build the two BS.1770 K-weighting biquads for sample_rate Hz.

Returns (stage1_high_shelf, stage2_high_pass); run a sample through stage 1 then stage 2. sample_rate is clamped to >= 1.0 so coefficients stay finite for degenerate inputs.