Calling setRate in WebAudioSound detune property's setter method

This commit is contained in:
Pavle Goloskokovic 2017-11-27 16:46:42 +01:00
parent 074c60c270
commit db06b3d742

View file

@ -214,7 +214,7 @@ Object.defineProperty(WebAudioSound.prototype, 'detune', {
set: function (value) {
this.currentConfig.detune = value;
if (this.source && this.source.detune) {
this.source.detune.setValueAtTime(Math.max(-1200, Math.min(value + this.manager.detune, 1200)), 0);
this.setRate();
}
}
});