Calling setRate method on all sound objects when updating global rate value

This commit is contained in:
Pavle Goloskokovic 2017-11-27 16:49:28 +01:00
parent 9fffd57ad3
commit c57f692c85

View file

@ -129,9 +129,7 @@ Object.defineProperty(WebAudioSoundManager.prototype, 'rate', {
set: function (value) {
this._rate = value;
this.sounds.forEach(function (sound) {
// invoke sound's rate setter method to update
// value based on new global rate value
sound.rate = sound.rate;
sound.setRate();
}, this);
}
});