Resetting loop source when updating sound playback rate if it is playing

This commit is contained in:
Pavle Goloskokovic 2017-12-22 15:24:25 +01:00
parent 187379ace2
commit 39f95cf6b4

View file

@ -257,6 +257,10 @@ var WebAudioSound = new Class({
time: Math.max(this.startTime, this.manager.context.currentTime) - this.playTime, time: Math.max(this.startTime, this.manager.context.currentTime) - this.playTime,
rate: this.totalRate rate: this.totalRate
}); });
if (this.loopSource) {
this.stopAndRemoveLoopBufferSource();
this.createAndStartLoopBufferSource();
}
} }
}, },
/** /**