mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
Using forEachActiveSound method when updating global rate and detune settings
This commit is contained in:
parent
55f8ca51af
commit
ec657a6517
1 changed files with 2 additions and 2 deletions
|
@ -240,7 +240,7 @@ Object.defineProperty(BaseSoundManager.prototype, 'rate', {
|
|||
},
|
||||
set: function (value) {
|
||||
this._rate = value;
|
||||
this.sounds.forEach(function (sound) {
|
||||
this.forEachActiveSound(function (sound) {
|
||||
sound.setRate();
|
||||
}, this);
|
||||
this.events.dispatch(new SoundValueEvent(this, 'SOUND_RATE', value));
|
||||
|
@ -256,7 +256,7 @@ Object.defineProperty(BaseSoundManager.prototype, 'detune', {
|
|||
},
|
||||
set: function (value) {
|
||||
this._detune = value;
|
||||
this.sounds.forEach(function (sound) {
|
||||
this.forEachActiveSound(function (sound) {
|
||||
sound.setRate();
|
||||
}, this);
|
||||
this.events.dispatch(new SoundValueEvent(this, 'SOUND_DETUNE', value));
|
||||
|
|
Loading…
Reference in a new issue