A simple, neat promise wrapper for the web Audio Context API, designed for use with browserify. Get and play sounds from urls with ease.
You'll need to use a Promise pattern with neatAudio, since it returns promises.
Fetch a Sound
var neatAudio = ;// Init neatAudioneatAudio;// Load the sound buffers into variableneatAudio;
Fetch Multiple Sounds
var neatAudio = ;var Promise = ; // or some other promise lib/polyfill// Init neatAudioneatAudio;// Declare some variables to look after your sound buffersvar sounds =click: nullshick: nullboom: null;// Load the sound buffers into local variablesPromiseallneatAudioneatAudioneatAudio;
- Modify project to show browserify bundling
- Test with browser
- Add tests for getting and playing sounds