neatAudio
A simple, neat promise wrapper for the web Audio Context API, designed for use with browserify. Get and play sounds from urls with ease.
Usage
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: null shick: null boom: null; // Load the sound buffers into local variablesPromiseall neatAudio neatAudio neatAudio;
Todo
- Modify project to show browserify bundling
- Test with browser
window
- Add tests for getting and playing sounds