Resetting rateUpdates before playing sound source

This commit is contained in:
Pavle Goloskokovic 2017-12-05 19:14:53 +01:00
parent fb9bc44685
commit 3176293f53

View file

@ -130,6 +130,7 @@ var WebAudioSound = new Class({
this.source = this.manager.context.createBufferSource(); this.source = this.manager.context.createBufferSource();
this.source.buffer = this.audioBuffer; this.source.buffer = this.audioBuffer;
this.source.connect(this.muteNode); this.source.connect(this.muteNode);
this.rateUpdates.length = 0;
this.applyConfig(); this.applyConfig();
this.source.onended = function (ev) { this.source.onended = function (ev) {
if (ev.target === this.source) { if (ev.target === this.source) {