We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 13d8918 commit cd6b6bfCopy full SHA for cd6b6bf
1 file changed
v3/src/sound/webaudio/WebAudioSound.js
@@ -250,12 +250,13 @@ var WebAudioSound = new Class({
250
*/
251
setRate: function () {
252
BaseSound.prototype.setRate.call(this);
253
+ var now = this.manager.context.currentTime;
254
if (this.source) {
- this.source.playbackRate.setValueAtTime(this.totalRate, 0);
255
+ this.source.playbackRate.setValueAtTime(this.totalRate, now);
256
}
257
if (this.isPlaying) {
258
this.rateUpdates.push({
- time: Math.max(this.startTime, this.manager.context.currentTime) - this.playTime,
259
+ time: Math.max(this.startTime, now) - this.playTime,
260
rate: this.totalRate
261
});
262
if (this.loopSource) {
0 commit comments