Mercurial > hg > webaudioevaluationtool
changeset 970:dea30ed2b549
Merge
author | Nicholas Jillings <nicholas.jillings@eecs.qmul.ac.uk> |
---|---|
date | Thu, 28 May 2015 19:27:39 +0100 |
parents | b93fb516ea6f (current diff) 917676cbdcc8 (diff) |
children | ffeef0ac7a5f |
files | ape.js core.js example_eval/project.xml |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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(); } }; }
--- 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() {