pub fn apply_equal_loudness(
mag: &[f32],
sample_rate: u32,
out: &mut [f32],
) -> Result<usize, AudioError>Expand description
Weight a magnitude spectrum mag by the A-weighting equal-loudness curve,
writing mag.len() weighted magnitudes into out.
mag:Nlinear magnitudes for bins0..N, spanning[0, fs/2].sample_rate: source sample ratefs(Hz); must be non-zero.out: at leastNfloats; receivesmag[k] ยท w(f_k).
Returns the number of bins written (mag.len()), or
AudioError::InvalidParameter for a zero sample rate, or
AudioError::OutputBufferTooSmall if out is shorter than mag.