 
     @av_info = @core.get_system_av_info()
 
-    # audio
+    @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)

      i++
    @bufOffset = 0
    @bufIndex = 0

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

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

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