 
 	startUserMedia: (stream) ->
 		@stream = stream
-		input = @audio_context.createMediaStreamSource(stream)
+		input = window.audioContext.createMediaStreamSource(stream)
 		@recorder = new Recorder(input, {workerPath: '/recorderWorker.js'})
 		@recorder.record()
 

		navigator.getUserMedia = navigator.getUserMedia or navigator.webkitGetUserMedia
		window.URL = window.URL or window.webkitURL

		@audio_context = new AudioContext

		ok = (stream) =>
			@startUserMedia(stream)


		@recorder.clear()

		window.audioContext.close()
		delete window.audioContext
		delete @recorder
		delete @stream

	getBlob: (cb) ->
		@recorder.exportWAV cb
