module for loading WebAudio buffers (and other loading utilities).
npm install [--save] waves-loaders
loading one file
import*asloadersfrom'waves-loaders';constloader=newloaders.AudioBufferLoader();loader.onProgress(progress=>console.log(progress));// { value:.., total:..., loaded:... }asyncfunctioninit(){awaitbuffer=loader.load('sound/file/url');// do something with `buffer`}loading multiple files
import*asloadersfrom'waves-loaders';constloader=newloaders.AudioBufferLoader();asyncfunctioninit(){awaitbuffers=loader.load(['sound/file-1','sound/file-1']);// do something with `buffers[0]` and `buffers[1]`}This module is released under the BSD-3-Clause license.
This code is part of the WAVE project, funded by ANR (The French National Research Agency), ContInt program, 2012-2015.