             outputBuffer: e.outputBuffer
           }
         }))
-
-      # # Example handling:
-      # inputBuffer = e.inputBuffer
-      # outputBuffer = e.outputBuffer
-      # # Each channel (usually only one)
-      # for (channel = 0; channel < outputBuffer.numberOfChannels; channel++) {
-      #   inputData = inputBuffer.getChannelData(channel)
-      #   outputData = outputBuffer.getChannelData(channel)
-      #
-      #   # Each sample
-      #   for (sample = 0; sample < inputBuffer.length; sample++) {
-      #     # Make output equal to the same as the input (thus processor is doing nothing at this time)
-      #     outputData[sample] = inputData[sample]
-      #   }
-      # }
-
-      # When manually encoding (safari/edge), there's no reason to copy data to output buffer.  We set the output
-      # gain to 0 anyways (which is required on Edge if we did copy data to output). However, if using a MediaRecorder
-      # and a processor (all other browsers), then it would be required to copy the data otherwise the graph would
-      # generate no data for the MediaRecorder to consume.
-      # if (forceScriptProcessor) {
-
-      # # Copy input to output
-      # inputBuffer = e.inputBuffer
-      # outputBuffer = e.outputBuffer
-      # # This doesn't work on iOS/Safari. Guessing it doesn't have copyToChannel support, but haven't verified.
-      # for (channel = 0; channel < outputBuffer.numberOfChannels; channel++) {
-      #   outputBuffer.copyToChannel(inputBuffer.getChannelData(channel), channel)
-      # }
-
-      # Safari and Edge require manual encoding via web worker. Single channel only for now.
-      # Example stereo encoderWav: https:#github.com/MicrosoftEdge/Demos/blob/master/microphone/scripts/recorderworker.js
       if (!@usingMediaRecorder)
         if (@state == 'recording')
           if (@config.broadcastAudioProcessEvents)

        micGain: 1.0,
        processorBufferSize: 2048,
        stopTracksAndCloseCtxWhenFinished: true,
        userMediaConstraints:
          audio: true
      return

    createWorker: (fn) ->
      js = fn
        .toString()
        .replace(/^function\s*\(\)\s*{/, '')
        .replace(/}$/, '')
      blob = new Blob([js])
      return new Worker(URL.createObjectURL(blob))

    startRecording: (timeslice) ->
      if (@state != 'inactive')
        return


      else
        @destinationNode = @audioCtx.destination

      #  Create web worker for doing the encoding
      if (!@usingMediaRecorder)
        @encoderWorker = new Worker('/assets/wav-worker.js')
        @encoderMimeType = 'audio/wav'

        that = this
        @encoderWorker.addEventListener('message', (e) ->
