lanczos-resampler
    Preparing search index...

    A resampler that processes audio input as a whole.

    Use it to process audio streams.

    This resampler uses default parameters: N = 16, A = 3.

    WholeResampler shouldn't be used to process audio track in chunks; use ChunkedResampler instead.

    Index

    Methods

    • Resample input signal from the source to the target sample rate and returns the resulting output signal as a vector.

      • Returns an empty array when either the input length or calculated output length is less than 2.
      • Returns an empty array when either the input length or the output sample rate is too large.

      Parameters

      • input: Float32Array

        input samples

      • inputSampleRate: number

        input sample rate in Hz

      • outputSampleRate: number

        output sample rate in Hz

      Returns Float32Array

    • 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.

      • Panics when the output isn't large enough to hold all the resampled points. Use numOutputFrames to ensure that the buffer size is sufficient.
      • Panics when either the input or the output length isn't evenly divisible by the number of channels.

      Parameters

      • input: Float32Array

        input frames

      • numChannels: number

        number of channels

      • output: Float32Array

      Returns number

    • 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.

      Parameters

      • input: Float32Array
      • output: Float32Array

      Returns number