-
Notifications
You must be signed in to change notification settings - Fork 0
signal.Resampling.Function.resampleLinearRef
dsp-collection / signal/Resampling / resampleLinearRef
function resampleLinearRef(
ia,
oa,
preserveScale?,
extraValues?): void;Defined in: signal/Resampling.ts:195
Reference implementation of one-dimensional resampling using linear interpolation.
This a slow reference implementation. It is simpler to understand than the optimized implementation and produces the same result.
ArrayLike<number>
Input array.
MutableArrayLike<number>
output array.
boolean = false
false: inputPosition = outputPosition / (oa.length - 1) * (ia.length - 1). The first input element matches the first output element and the last input element matches the last output element. The array is processed symetrically. true: inputPosition = outputPosition / oa.length * ia.length. The first input element matches the first output element, but the last input element does not match the last output element.
number = 0
Value for the extra array entries at the end, when upsampling with preserveScale = true.
void