diff --git a/js/ui/audio.js b/js/ui/audio.js index 306c67a..7cc0ea3 100644 --- a/js/ui/audio.js +++ b/js/ui/audio.js @@ -20,10 +20,11 @@ var sound = true; var _samples = []; var audioContext; +var AudioContext = window.AudioContext || window.webkitAudioContext; var audioNode; -if (window.AudioContext) { - audioContext = new window.AudioContext(); +if (AudioContext) { + audioContext = new AudioContext(); audioNode = audioContext.createScriptProcessor(4096, 1, 1); audioNode.onaudioprocess = function(event) {