# HG changeset patch # User Brecht De Man # Date 1432754657 -3600 # Node ID 93fa802a9318f37b5926404f120f7f13656d03c4 # Parent 2e8500c4df02c169d4af7cbd263d0ffc734e36b4 Fixed bug where 'all played' wasn't checked anymore in loop mode. Now in non-loop mode, 'flagAsPlayed' needs to be called explicitly from ape.js (may want to change) diff -r 2e8500c4df02 -r 93fa802a9318 ape.js --- a/ape.js Wed May 27 19:00:20 2015 +0100 +++ b/ape.js Wed May 27 20:24:17 2015 +0100 @@ -365,6 +365,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 2e8500c4df02 -r 93fa802a9318 core.js --- a/core.js Wed May 27 19:00:20 2015 +0100 +++ b/core.js Wed May 27 20:24:17 2015 +0100 @@ -521,9 +521,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() { @@ -546,7 +551,6 @@ this.metric.startListening(audioEngineContext.timer.getTestTime()); } this.bufferNode.start(startTime); - this.played = true; }; this.stop = function() {