resample

Function resample 

Source
pub fn resample(input: &[i16], from_hz: u32, to_hz: u32) -> Vec<i16>
Expand description

Linear-interpolation resampling for mono PCM16, one buffer at a time.

Cheap, with no filter and no state: fine between rates that are both well above the speech band, but it aliases when going down to telephone rates and clicks at chunk boundaries. Streams use StreamResampler, which the voice pump and telephony bridges do. Same-rate input is returned unchanged.