Skip to content

Commit bd70c32

Browse files
authored
Merge pull request #68 from rpgtkoolmv/fix_fadeout
fix don't work fadeout bgm/bgs correctly on Firefox
2 parents 2a2aab2 + 35d4824 commit bd70c32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/rpg_core/WebAudio.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ WebAudio.prototype.fadeOut = function(duration) {
421421
if (this._gainNode) {
422422
var gain = this._gainNode.gain;
423423
var currentTime = WebAudio._context.currentTime;
424-
gain.setValueAtTime(gain.value, currentTime);
424+
gain.setValueAtTime(this._volume, currentTime);
425425
gain.linearRampToValueAtTime(0, currentTime + duration);
426426
}
427427
this._autoPlay = false;

0 commit comments

Comments
 (0)