 
       @encoderMimeType = 'audio/wav'
 
-      @config =
+      @config = {
         broadcastAudioProcessEvents: false,
         createAnalyserNode: true,
         createDynamicsCompressorNode: false,

        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) ->
