Resamples a block of linear PCM16 samples from fromRate to toRate using linear interpolation.
Handles the telephony rate set (8 k ↔ 16 k ↔ 24 k) and any other positive integer rates. When the
rates are equal the input is returned as a fresh copy (never the same reference, so callers can
mutate freely). The output length is round(input.length * toRate / fromRate).
Resamples a block of linear PCM16 samples from
fromRatetotoRateusing linear interpolation.Handles the telephony rate set (8 k ↔ 16 k ↔ 24 k) and any other positive integer rates. When the rates are equal the input is returned as a fresh copy (never the same reference, so callers can mutate freely). The output length is
round(input.length * toRate / fromRate).