Skip to main content

resample_i16

Function resample_i16 

Source
pub fn resample_i16(
    samples: &[i16],
    source_rate: u32,
    target_rate: u32,
) -> Result<Vec<i16>, PcmError>
Expand description

Convert one complete signed-16 stream between explicit rates.

For adjacent chunks use LinearResampler directly so interpolation history crosses the chunk boundary.

ยงErrors

Returns PcmError::UnsupportedSampleRate when either rate is unsupported.