# HG changeset patch # User Nicholas Jillings # Date 1432837659 -3600 # Node ID c849dcbe71aafc4a382e26be95447daacaf9dfb3 # Parent d769f1623203c97651f836e95d3cdcb7ccad3b09# Parent 93fa802a9318f37b5926404f120f7f13656d03c4 Merge diff -r d769f1623203 -r c849dcbe71aa 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 d769f1623203 -r c849dcbe71aa 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() {