Web Audio Context API
The Web Audio Context API surprised me in how fully featured it is. Most of the docs and tutorials I found on it are from late 2011 so it shows that I'm late getting to the party. Despite the time passing it appears to only have great support in Chrome (This life best viewed in Chrome :p ).
The following constructor creates a shiny new AudioContext Object:
var audioContext = new webkitAudioContext();
constructor. The problem is that the
Object.create() makes more sense but these DOM APIs aren't exposed in that way AFAIK. That's why I've been wrapping so many DOM Objects in AudioFile Objects so that I can just set the DOM object as a property of my AF Object via a
new constructor but when I want to get an 'instance' of the object I just clone the AF object via
I wonder how that's all gonna change with ECMAScript 6 classes?
Back to the Web Audio Context()
The following are the out of the box properties of the AudioContext Object:
- activeSourceCount: 0
- currentTime: 1.4164172335600906
- destination: AudioDestinationNode
- listener: AudioListener
- oncomplete: null
- sampleRate: 44100
The following are the out of the box methods of the AudioContext Object:
As you can see there's a lot going on here. I'm going to play around with this a bit and see what I can come up with. I'll check back in later.
See something wrong or got something to add/change? Fork this git repo and send me a pull request
If you particularly enjoy my work, I appreciate donations given with Gitcoin.co