 
 
   startAll: =>
-    @playSound(mediator.activeLevel+'theme',mediator.levels[mediator.activeLevel].soundList, 1, true)
+    @playSound(mediator.activeLevel+'theme.mp3',mediator.getActiveLevel().themeSound, 1, true)
     @startBackgroundSounds()
     @updateBackgroundSounds(mediator.player.position)
 

    return soundMap


  ###
  @param [String]
  @param [Array of String]
  Load all sounds in soundMap
  ###
  loadSounds: (LEVEL, mapSounds) =>
    for sound in mapSounds.sounds
      mediator.levels[LEVEL].soundList[sound] = new SoundObj
      mediator.std.xhrGet @PATH+sound+'.mp3', @bufferSounds, 'arraybuffer', sound, mediator.levels[LEVEL].soundList, LEVEL

    for sound in mapSounds.backgroundSounds
      mediator.levels[LEVEL].backgroundSounds[sound] = new SoundObj
      mediator.std.xhrGet @PATH+sound+'.mp3', @bufferSounds, 'arraybuffer', sound, mediator.levels[LEVEL].backgroundSounds, LEVEL


  loadSounds: (sounds) =>

    for sound in mapSounds.sounds
      mediator.levels[LEVEL].soundList[sound] = new SoundObj
      mediator.std.xhrGet @PATH+sound+'.mp3', @bufferSounds, 'arraybuffer', sound, mediator.levels[LEVEL].soundList, LEVEL

    for sound in mapSounds.backgroundSounds
      mediator.levels[LEVEL].backgroundSounds[sound] = new SoundObj
      mediator.std.xhrGet @PATH+sound+'.mp3', @bufferSounds, 'arraybuffer', sound, mediator.levels[LEVEL].backgroundSounds, LEVEL




    request = event.target
    sound = request.additionalAttributes[0]
    list = request.additionalAttributes[1]
    callback = request.additionalAttributes[2]

    buffer = @audioContext.createBuffer(request.response, false)
    list[sound].buffer = buffer

    console.log sound+' loaded'

    @soundCount--
    if @soundCount <= 0
      callback(@soundList, @backgroundSounds, @themeSound)

  ###
  @param [String]
