Function lowpass_filter::simple::sp::apply_lpf_i16_sp[][src]

pub fn apply_lpf_i16_sp(
    data: &mut [i16],
    sample_rate_hz: u16,
    cutoff_frequency_hz: u16

Applies a single precision (float, f32) low pass filter on a vector of mono sample in 16 bit resolution. If you have stereo data, call this function for each channel, convert it first to mono or do whatever fits your use case.


  • data audio samples
  • sample_rate_hz Sample Rate, e.g. 44100Hz
  • cutoff_frequency_hz upper bound for frequencies to be cut, e.g. 150Hz