Audio management

I have a silly question,

I would like to know if it is possible to manage the audio separately (ex: global volume, music volume, interface volume …) with phaser 3 ?

I explain, basically having a kind of volume mixer to make several audio channels and manage them separately. I don’t know if I’m clear.

Or it would be better to manage this with a third-party lib.

I’m sorry for my english and thank you for your answers

Not exactly, but you can create extra Sound Managers:

new Phaser.Game({
  callbacks: {
    preBoot: function (game) {
      game.music = Phaser.Sound.SoundManagerCreator.create(game);
      game.uiSound = Phaser.Sound.SoundManagerCreator.create(game);
      // That makes 3 in all (after `game.sound`)
    }
  }
});
1 Like

Thank you very much for your solution, Samme :star_struck: :star_struck: !!

In your scenes you can then find these on e.g. this.game.music or this.game.uiSound.

And there is still the original sound manager, this.sound.