You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you play a sound for the first time, it's loaded, but not yet decoded. So the SoundManager.prototype.play method will call SoundManager.prototype.decode, which then will perform two calls to Sound.prototype.play in short intervals:
after decoding there is a call to Sound.prototype.setDecodedBuffer, which in turn calls the Sound.prototype.play function (with the correct volume configured).
after step 1 the callback of SoundManager.prototype.decode is called which then calls SoundManager.prototype.play. Since only the key is given as an argument, the play function assumes a volume of 1.0.
I created a pull request for a possible interim solution until the new SoundManager is in place.
The first time I call:
myGame.sound.play('gameOver', 0.1, false);
the volume is ignored and is played at volume=1. Subsequent times it is played, the volume param works.
The text was updated successfully, but these errors were encountered: