Skip to content

Commit 3967a11

Browse files
Dispatching event when global mute value changes
1 parent d732083 commit 3967a11

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

v3/src/sound/webaudio/WebAudioSoundManager.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
var Class = require('../../utils/Class');
22
var BaseSoundManager = require('../BaseSoundManager');
33
var WebAudioSound = require('./WebAudioSound');
4+
var SoundValueEvent = require('../SoundValueEvent');
45
// Phaser.Loader.WebAudioSoundManager
56
var WebAudioSoundManager = new Class({
67
Extends: BaseSoundManager,
@@ -98,6 +99,7 @@ Object.defineProperty(WebAudioSoundManager.prototype, 'mute', {
9899
},
99100
set: function (value) {
100101
this.masterMuteNode.gain.setValueAtTime(value ? 0 : 1, 0);
102+
this.events.dispatch(new SoundValueEvent(this, 'SOUND_MUTE', value));
101103
}
102104
});
103105
/**

0 commit comments

Comments
 (0)