SineWave = function(context) {
  var that = this;
  this.x = 0; // initial samples
  this.context = context;
  this.node = context.createScriptProcessor(1024, 1, 1);
  this.node.onaudioprocess = function(event) { that.process(event) };

}

// Processess wave and outputs to

SineWave.prototype.process = function(event) {
  var data = event.outputBuffer.getChannelData(0);
  for (var i = 0; i < data.length; ++i){
    data[i] = Math.sin(this.x++);
  }
}


@@ -444,12 +444,171 @@
 ++);%0A  %7D%0A%7D%0A%0A
+SineWave.prototype.play = function () %7B%0A  this.node.connect(this.context.destination);%0A%7D%0A%0ASineWave.prototype.pause = function () %7B%0A  this.node.disconnect();%0A%7D%0A

add play and pause methods