diff core.js @ 136:c849dcbe71aa

Merge
author Nicholas Jillings <nicholas.jillings@eecs.qmul.ac.uk>
date Thu, 28 May 2015 19:27:39 +0100
parents d769f1623203 93fa802a9318
children 04fcd51441e5
line wrap: on
line diff
--- 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() {