package
Loads buffers using the webaudio api
npm install webaudio-buffer-loaderGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 2 packages.
788.8 kB
Includes dependencies.
Little util for grabbing files from a server and loading them as AudioBuffers in a web audio context.
npm install webaudio-buffer-loadervar ctx = new AudioContext();
var loader = require('webaudio-buffer-loader');
var buffers = ['schiphol.mp3', 'what-time-taught-us.ogg', 'oxbow-b.wav'];
loader(buffers, ctx, function(err, loadedBuffers) {
// use yer buffers
});The first argument can be an array of paths or a single path. If any of the requests to grab the file at a path fail, the cb will be called with the error.