Function resample

Resamples PCM samples from one sample rate to another.

  • Parameters

    • samples: number[]

      Array of PCM samples (integers at given bit depth)

    • inputSampleRate: number

      The sample rate of the input samples

    • targetSampleRate: number

      The target sample rate

    • bitDepth: BitDepth

      The bit depth of the PCM samples (must be in BIT_DEPTHS)

    Returns number[]

    Array of resampled PCM samples