phaserjs / phaser-ce

Phaser CE is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.
http://phaser.io
MIT License
1.34k stars 491 forks source link

IE11: HTML Audio: Sound: Volume is not affected by global game.sound.volume. #617

Closed micsun-al closed 5 years ago

micsun-al commented 5 years ago

This Issue is about (pick one, ✏️ delete others)

rich seems to know about a fix about multiplying Sound's "volume" property by "_globalVolume", but I was unable to get this to work.

Is it this line?

this._sound.volume = this._volume

...changing it to something like this?

this._sound.volume = this._volume * this._globalVolume

Thank you!

samme commented 5 years ago

What happens instead: Playing audio is audible.

Are these sounds that started playing before or after game.sound.volume changed to 0?

micsun-al commented 5 years ago

game.sound.volume does not seem to affect the volume of the sounds that are playing before or after game.sound.volume is changed.

micsun-al commented 5 years ago

Here's the chat log from Slack #phaser-ce.

image

samme commented 5 years ago

I'll make a test.

samme commented 5 years ago

https://424v2y53o7.codesandbox.io

Seems to work.

  1. Set Sound Manager: volume to 0 in GUI panel.
  2. Click Sound: loopFull in GUI panel.
  3. Wait.
  4. Set Sound Manager: volume above 0.
micsun-al commented 5 years ago

Confirming fix works on Windows 10 (1809) IE11 (11.253.17763.0).

samme commented 5 years ago

Fixed in f44bbb5