         catch e
             alert(e)
         
-        @mainNode = @context.createGainNode()
+        @mainNode = @context.createGain()
         @mainNode.connect(@context.destination)
+        @mainNode.gain.value = @defaultVolume
     
 
     loadSounds: ->

    # wrap the real play (_play()) in a load() call to ensure sound was loaded
    # calling play on an already playing Sound object has no effect
    play: () ->
        if not @playing or (@source? and @source.playbackState == @source.FINISHED_STATE)
            @playing = true
            @load(() => @_play(@loop, @volume))
        
    _play: (looping, volume) ->
        @source = gGame.soundManager.getSoundSource(@key, { loop: looping, volume: volume })
        @source.start(0)
    
    stop: ->
        @source?.stop(0)
        @source = null
        @playing = false


    enabled: true
    context: null
    mainNode: null
    defaultVolume: 0.5
    
    soundMap:
        shoot: 'assets/sound/shoot.mp3'
