waves-loaders

0.1.6 • Public • Published

waves-loaders

module for loading WebAudio buffers (and other loading utilities).

Installation

npm install [--save] waves-loaders

Example

loading one file

import * as loaders from 'waves-loaders';

const loader = new loaders.AudioBufferLoader();
loader.onProgress(progress => console.log(progress));
// { value:.., total:..., loaded:... }

async function init() {
  await buffer = loader.load('sound/file/url');
  // do something with `buffer`
}

loading multiple files

import * as loaders from 'waves-loaders';

const loader = new loaders.AudioBufferLoader();

async function init() {
  await buffers = loader.load(['sound/file-1', 'sound/file-1']);
  // do something with `buffers[0]` and `buffers[1]`
}

License

This module is released under the BSD-3-Clause license.

Acknowledgments

This code is part of the WAVE project, funded by ANR (The French National Research Agency), ContInt program, 2012-2015.

Dependencies (1)

Dev Dependencies (17)

Package Sidebar

Install

npm i waves-loaders

Weekly Downloads

18

Version

0.1.6

License

BSD-3

Unpacked Size

94.7 kB

Total Files

16

Last publish

Collaborators

  • ouhouhsami
  • b-ma