Expand description
Simple sample rate conversion lib.
§Usage
Sinc converters have FIR latency. Prefer sinc::Manager::convert for
complete buffers; for streaming, skip sinc::Manager::latency samples
at the start and call Convert::flush after the last input until it
returns 0. Built-in sinc / linear converters stop writing once the
delay line is empty; the trait default of Convert::flush does not.
Float ratios passed to constructors may be reduced to a rational when a
continued-fraction approximation has numerator and denominator ≤ 16384
and relative error ≤ 1e-12; otherwise the converter uses a floating-point
phase (ConvertMode::Float). Prefer sinc::Manager::with_sample_rate
(or integers) when you need an exact rate pair such as 44100/48000.
Multi-channel audio is N independent mono converters that must stay
frame-aligned. Process planar buffers (one contiguous slice per channel).
process_planar / flush_planar keep consume/produce counts in lockstep
and return Error if channel counts or buffer lengths do not match.
Modules§
Structs§
Enums§
- Convert
Mode - Interpolation implementation selected from the conversion ratio.
- Error
- Quality
- Recommended sinc quality presets.
Traits§
Functions§
- flush_
planar - Flush planar converters in lockstep. See
Convert::flush. - process_
planar - Process planar channel buffers in lockstep.