Resample input signal from the source to the target sample rate and returns the resulting output signal as a vector.
input samples
input sample rate in Hz
output sample rate in Hz
This is a variant of resampleInto that processes several audio channels (one audio frame) at a time.
Returns 0 when either the number of input frames or the number of remaining output frames is less than 2.
input frames
number of channels
This is a variant of WholeResampler.resample that doesn't use memory allocation.
Returns the number of samples read from the input. Currently this is either 0 (see "Panics") or the input length.
Returns 0 when either the input length or remaining output length is less than 2.
Panics when the output isn't large enough to hold all the resampled points. Use numOutputFrames to ensure that the buffer size is sufficient.
A resampler that processes audio input as a whole.
Use it to process audio streams.
Parameters
This resampler uses default parameters: N = 16, A = 3.
Limitations
WholeResamplershouldn't be used to process audio track in chunks; use ChunkedResampler instead.