Jump to content

Phaser Audio Level/Volume


Recommended Posts



 I'm finding no difference between these two lines:

// Should be 1/10 volume?this.gameSounds.play( "auditorium_applause_big_06", 0, 0.1, false, true);// Should be full volumne?this.gameSounds.play( "auditorium_applause_big_06", 0, 1.0 , false, true);

Can volume not be controlled, or is this the wrong input to this parameter? I need to play two sounds at once (well, three); and have the background sound playing quieter. Am I forced to modify the source sound?


The above code is using a single sound with markers, initiated this way:

 this.gameSounds = this.game.add.audio(this.theme.soundKey); this.gameSounds.allowMultiple = true; _.each( this.theme.sounds, function( timing, key ) {     this.gameSounds.addMarker(key, timing[0], timing[1], 1, timing[2]); }, this); // this.gameSounds.onMarkerComplete.add(this.onSoundFinished, this); // This event seems broken. this.gameSounds.onStop.add(this.onSoundFinished, this);

Hrm, now I'm wondering if I have to control the sound when I add the marker? I'm going to try that and I'll reply to my own post if it works.


Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...