         @buffers[@bufIndex].endTime = startTime + @buffers[@bufIndex].duration
         source = @audio.createBufferSource()
         source.buffer = @buffers[@bufIndex]
-        source.connect @audio.destination
+        source.connect @destination
         source.start startTime
         @bufIndex++
         @bufOffset = 0

      i++
    @bufOffset = 0
    @bufIndex = 0

    @core.load_game @game if @game?
    @core.unserialize @save if @save?

  initGL: ->
    fragmentShader = @gl.createShader @gl.FRAGMENT_SHADER


    @av_info = @core.get_system_av_info()

    @initAudio()

    @core.load_game @game if @game?
    @core.unserialize @save if @save?

  initAudio: ->
    @then = 0
    @sampleRate = @av_info.timing.sample_rate
    @numBuffers = Math.floor @latency * @sampleRate / (1000 * @bufferSize)
