Function lowpass_filter::simple::apply_lpf_i16[][src]

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

Applies a 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 cutted, e.g. 150Hz