mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 08:38:00 +00:00
using exponentialApproachValueAtTime
This commit is contained in:
parent
0723f50796
commit
6d38440379
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue