# HG changeset patch # User Nicholas Jillings # Date 1474389267 -3600 # Node ID 54782e20bc62107735f97af0985cb036728f1c4a # Parent 309ed146c2e6780cc12de37c229030558831e012 Potential fix for looped playback in chrome diff -r 309ed146c2e6 -r 54782e20bc62 js/core.js --- a/js/core.js Tue Sep 20 17:19:39 2016 +0100 +++ b/js/core.js Tue Sep 20 17:34:27 2016 +0100 @@ -1840,7 +1840,13 @@ } else { this.outputGain.gain.setValueAtTime(0.0, startTime); } - this.bufferNode.start(startTime, this.specification.startTime || 0, this.specification.stopTime - this.specification.startTime || this.buffer.buffer.duration); + if (audioEngineContext.loopPlayback) { + this.bufferNode.loopStart = this.specification.startTime || 0; + this.bufferNode.loopEnd = this.specification.stopTime - this.specification.startTime || this.buffer.buffer.duration; + this.bufferNode.start(startTime); + } else { + this.bufferNode.start(startTime, this.specification.startTime || 0, this.specification.stopTime - this.specification.startTime || this.buffer.buffer.duration); + } this.bufferNode.playbackStartTime = audioEngineContext.timer.getTestTime(); } };