Skip to main content

resampler_from_quality

Function resampler_from_quality 

Source
pub fn resampler_from_quality<T: Sample>(
    num_channels: usize,
    in_sample_rate: u32,
    out_sample_rate: u32,
    config: ResamplerConfig,
) -> Box<dyn Resampler<T>>
Expand description

Create a new Resampler with the given settings.

  • num_channels - The number of audio channels.
  • in_sample_rate - The sample rate of the input data.
  • out_sample_rate - The sample rate of the output data.
  • config - Extra configuration for the resampler.

ยงPanics

Panics if:

  • num_channels == 0
  • in_sample_rate == 0
  • out_sample_rate == 0
  • config.chunk_size == 0
  • config.sub_chunks == 0