diff --git a/Tone/source/BufferSource.js b/Tone/source/BufferSource.js index 2e2246e9..0cbeee44 100644 --- a/Tone/source/BufferSource.js +++ b/Tone/source/BufferSource.js @@ -185,7 +185,7 @@ define(["Tone/core/Tone", "Tone/core/Buffer", "Tone/source/Source", "Tone/core/G if (this.curve === "linear"){ this._gainNode.gain.linearRampToValueAtTime(this._gain, time + fadeInTime); } else { - this._gainNode.gain.setTargetAtTime(this._gain, time, this._gainNode.gain.getTimeConstant(fadeInTime)); + this._gainNode.gain.exponentialAppraochValueAtTime(this._gain, time, fadeInTime); } } else { this._gainNode.gain.setValueAtTime(gain, time); @@ -268,7 +268,7 @@ define(["Tone/core/Tone", "Tone/core/Buffer", "Tone/source/Source", "Tone/core/G if (this.curve === "linear"){ this._gainNode.gain.linearRampToValueAtTime(0, time); } else { - this._gainNode.gain.setTargetAtTime(0, startFade, this._gainNode.gain.getTimeConstant(fadeOutTime)); + this._gainNode.gain.exponentialAppraochValueAtTime(0, startFade, fadeOutTime); } } else { this._gainNode.gain.setValueAtTime(0, time);