# HG changeset patch # User Nicholas Jillings # Date 1432837659 -3600 # Node ID dea30ed2b549aa35924c5ff7439d355e1e3afae6 # Parent b93fb516ea6f03cba8d8ed8205351ff6b7b56312# Parent 917676cbdcc8df59bdebb983487dcbadb351319e Merge diff -r b93fb516ea6f -r dea30ed2b549 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 b93fb516ea6f -r dea30ed2b549 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() {