lanczos-resampler
    Preparing search index...

    Function initWithExports

    • Initialize the library using WebAssembly instance exports.

      Use this function to asynchronously initialize the library. This function is a simple setter that doesn't involve WebAssembly compilation.

      import { ChunkedResampler, IMPORT_OBJECT, initWithExports } from 'lanczos-resampler/loader'
      import codeURL from 'lanczos-resampler/code.wasm?url' // Vite.

      const result = await WebAssembly.instantiateStreaming(fetch(codeURL), IMPORT_OBJECT)
      initWithExports(result.instance.exports)

      const resampler = new ChunkedResampler(44100, 48000)
      console.debug(resampler)

      Parameters

      • exports: any

      Returns void