hoch/WAAX — pull request #4 by colinsullivan (2013-12-17 23:57:52+00:00)
Title: Graceful failure on older systems.

These changes allow users to gracefully fail when the system doesn't support newer browser technologies. This means that WAAX doesn't need to be conditionally loaded on the page, instead it can be loaded in any browser (all the ones I've tested at least), and an error from a single place, `WX.init` can be handled to fail gracefully.

I even tested it on a browser that didn't support `Float32Array`.

This requires some sort of initialize method, because many classes that required static member variables depend on the `WX.context`, which will not be set if the browser doesn't support web audio. Thus, I've implemented `WX.init` that must be called before instantiating any other waax classes. `WX.init` does all the setup that used to be done when the script was loaded, including instantiating `WX.DAC`. Thus, if an error occurs while initializing waax it will occur when calling this method, providing users with the opportunity to catch the error and handle accordingly.

Feel free to send along any questions or suggestions!