Merge pull request from ipedrazas/master

Fixed the error 'createGainNode is not a function'
This commit is contained in:
Shane M. Clements 2013-11-12 09:49:11 -08:00
commit d302a6234c

View file

@ -42,7 +42,11 @@ Runtime.prototype.init = function() {
this.scene = $('#container');
window.AudioContext = window.AudioContext || window.webkitAudioContext;
this.audioContext = new AudioContext();
this.audioGain = this.audioContext.createGainNode();
try{
this.audioGain = this.audioContext.createGain();
}catch(err){
this.audioGain = this.audioContext.createGainNode();
}
this.audioGain.connect(runtime.audioContext.destination);
};