fixes buffer initialization in Player.js

This commit is contained in:
Kevin Siwoff 2014-10-22 18:24:58 -04:00
parent 1422a544f9
commit 054d5ff2e8

View file

@ -218,11 +218,7 @@ define(["Tone/core/Tone", "Tone/core/Buffer", "Tone/source/Source"], function(To
Tone.Player.prototype.setPlaybackRate = function(rate, rampTime){
this._playbackRate = rate;
if (this._source) {
if (rampTime){
this._source.playbackRate.exponentialRampToValueAtTime(rate, this.toSeconds(rampTime));
} else {
this._source.playbackRate.value = rampTime;
}
this._source.playbackRate.exponentialRampToValueAtTime(rate, this.toSeconds(rampTime));
}
};