scottschiller/SoundManager2 — pull request #39 by binlain (2013-10-02 17:02:26+00:00)
Title: Add HTML5 waveform parsing

Hello. Soundmanger2 was always a little limited in its capabilities by only having waveform and equalizer data available when using the flash plugin.

I have implemented a 'waveform parser' for the HTML5 player in JavaScript.
It works at least in Chrome, using the standard HTML5 Web Audio API (But it should work in all other browsers offering that API too) and in Firefox, using Firefox's soon to be deprecated Audio API.

Currently it will only enable itself if DSP.js is available, because it uses a fast Fourier transform to convert the waveform data into 'equalizer' data. So include DSP.js in the page if you want to test it.

I also had to modify the eqData property a little, so it only has left and right channels now, not that 'global' channel that was left there for compatibility reasons.
The eqData property is now also different in the way that it may have an other number of float values than 255.

I wrote this for http://volafile.io and it works for my use case. I didn't test it for anything else and can't guarantee it's bugfree, as I had troubles comprehending the 6000 lines of source code of the project. I just wanted to give some of my work back to the community.