Sign in to follow this  
georgejfrick

Phaser Audio Level/Volume

Recommended Posts

Hello,

 

 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.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.