hoch/WAAX — pull request #10 by colinsullivan (2014-04-09 20:21:09+00:00)
Title: Sampler node management

This implementation is not meant to be a polyphonic sampler, although it could evolve into one. I have implemented a list of active nodes instead of just keeping track of the most recent. This list is maintained so the nodes have time to finish and call `onended` before they are removed from the heap. Since they aren't removed immediately after calling `stop`, it allows `stop` to be called multiple times, because we wait until the sound actually finishes to remove the reference to the node.

Calling stop multiple times is specified here:

http://webaudio.github.io/web-audio-api/#widl-AudioBufferSourceNode-stop-void-double-when

Also included is the start of a unit test framework for WAAX. The tests included test the timing of the `oneshot`, `start`, and `stop` methods, as well as that the proper behavior occurs when calling `stop` more than once (most recent stop time is used).