From ec657a6517d51b6bbc377d1462d1e337c9b3b73b Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Thu, 4 Jan 2018 19:53:47 +0100 Subject: [PATCH] Using forEachActiveSound method when updating global rate and detune settings --- v3/src/sound/BaseSoundManager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v3/src/sound/BaseSoundManager.js b/v3/src/sound/BaseSoundManager.js index 66452d7a7..4d21019dd 100644 --- a/v3/src/sound/BaseSoundManager.js +++ b/v3/src/sound/BaseSoundManager.js @@ -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));