mirror of
https://github.com/Tonejs/Tone.js
synced 2025-01-03 15:38:42 +00:00
fixes buffer initialization in Player.js
This commit is contained in:
parent
1422a544f9
commit
054d5ff2e8
1 changed files with 1 additions and 5 deletions
|
@ -218,11 +218,7 @@ define(["Tone/core/Tone", "Tone/core/Buffer", "Tone/source/Source"], function(To
|
||||||
Tone.Player.prototype.setPlaybackRate = function(rate, rampTime){
|
Tone.Player.prototype.setPlaybackRate = function(rate, rampTime){
|
||||||
this._playbackRate = rate;
|
this._playbackRate = rate;
|
||||||
if (this._source) {
|
if (this._source) {
|
||||||
if (rampTime){
|
this._source.playbackRate.exponentialRampToValueAtTime(rate, this.toSeconds(rampTime));
|
||||||
this._source.playbackRate.exponentialRampToValueAtTime(rate, this.toSeconds(rampTime));
|
|
||||||
} else {
|
|
||||||
this._source.playbackRate.value = rampTime;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue