WAV file player in pure Javascript

Web Audio API is one of the cutting edge technology Javascript has offered. (It isn’t even supported in IE11! But both Chrome and Firefox now support it without prefix). It allows direct low-level manipulation of audio data (to sample level).

While .wav file format is supported by all browsers (Support here is defined by ability to be decoded via AudioContext.decodeAudioData, which is normally the same as those supported in <audio> tag), many other format is not, such as MP3/AAC/Ogg due to various patent problems. Because audio codecs, as opposed to video codec, require very low power to decode, it has been done in pure Javascript before (jsMAD, etc). I actually aim to write some audio decoder in pure Javascript too, so the .wav file playing is the first stepping stone. (audiocogs/etc is Not Invented Here™)

tl;dr here’s the code: https://gist.github.com/innocenat/5c5a48365930b691c863 Read on for detail.

Introducing InnoWiki

Well, this is not actually planned, but it is simple enough that I can hacked things together in a couple of day (and yes, the code is very short, but very hackish)

Let meet InnoWiki: http://innowiki.innocen.at/ [GitHub]