var audio_context, oscillator, gainNode, volController;

var initialVol = 0.8;
var currentVol = initialVol;
var finalVol = 0;

  function stopSound() {
    clearInterval(volController);
    currentVol = initialVol;
    
    //oscillator.noteOff(0);
    gainNode.disconnect(audio_context.destination);
  }

  function playSound(freq) {
          if(gainNode != undefined){ stopSound(); }
          oscillator = audio_context.createOscillator();
          gainNode = audio_context.createGain();
          
          oscillator.connect(gainNode);
          gainNode.connect(audio_context.destination);
          
          oscillator.type = "triangle";
          oscillator.frequency.value = freq;
          oscillator.start();
          gainNode.gain.value = $("#oscillator-gain").val();
  }
  
  $("#oscillator-gain").change(function(){
    gainNode.gain.value = $("#oscillator-gain").val();
  });
  
 (function init(g){
 	try{
 		audio_context = new(g.AudioContext || g.webkitAudioContext);
 		oscillator = audio_context.createOscillator();
 	} catch(e){
 		alert("No web audio oscillator support in this browser. Use Chrome, fool!");
 		soundIssues = true;
 	}
 }(window));

@@ -785,13 +785,27 @@
 ;%0A  
-%7D%0A  %0A
+        %0A          
   $(
@@ -843,16 +843,24 @@
 tion()%7B%0A
+        
     gain
@@ -912,11 +912,23 @@
 ;%0A  
-%7D);
+        %7D);%0A  %7D
 %0A  %0A

Update sound.js