# HG changeset patch # User Nicholas Jillings # Date 1432837659 -3600 # Node ID 01a66735e0e779d162c4bc502452085386f03dd0 # Parent d5d7dfdbf335bc716fa5a32f87233ebf20090a6b# Parent 4bf502a0756bc7ad7847d61280bc8c66ffe213e9 Merge diff -r d5d7dfdbf335 -r 01a66735e0e7 ape.js --- a/ape.js Thu May 28 18:58:45 2015 +0100 +++ b/ape.js Thu May 28 19:27:39 2015 +0100 @@ -368,6 +368,7 @@ if (this.status == 1) { this.audioObjects[id].outputGain.gain.value = 1.0; this.audioObjects[id].play(audioContext.currentTime+0.01); + this.audioObjects[id].flagAsPlayed(); } }; } diff -r d5d7dfdbf335 -r 01a66735e0e7 core.js --- a/core.js Thu May 28 18:58:45 2015 +0100 +++ b/core.js Thu May 28 19:27:39 2015 +0100 @@ -529,9 +529,14 @@ // When stopeed, the buffer node is deleted and recreated with the stored buffer. this.buffer; + this.flagAsPlayed = function() { // to be called explicitly when not in loop mode + this.played = true; + } + this.loopStart = function() { this.outputGain.gain.value = 1.0; this.metric.startListening(audioEngineContext.timer.getTestTime()); + this.played = true; } this.loopStop = function() { @@ -554,7 +559,6 @@ this.metric.startListening(audioEngineContext.timer.getTestTime()); } this.bufferNode.start(startTime); - this.played = true; }; this.stop = function() {