# HG changeset patch # User Nicholas Jillings # Date 1509377084 0 # Node ID 9dc50ba0c13f6e0348e8908f3398ca581b4948e9 # Parent aa86f045d338dfab9c20c766ffea5c1fd72c98b7# Parent 451e104f8667a42ebe5d5bc0d614a04bee4e4626 Merge branch 'vnext' into Dev_main diff -r aa86f045d338 -r 9dc50ba0c13f js/core.js --- a/js/core.js Tue Oct 17 17:03:10 2017 -0400 +++ b/js/core.js Mon Oct 30 15:24:44 2017 +0000 @@ -1912,6 +1912,7 @@ this.url = null; // Hold the URL given for the output back to the results. this.metric = new metricTracker(this); this.storeDOM = null; + this.playing = false; // Bindings for GUI this.interfaceDOM = null; @@ -1988,21 +1989,23 @@ }; this.listenStart = function (setTime) { - if (this.outputGain.gain.value !== this.onplayGain) { + if (this.playing === false) { playCounter++; this.outputGain.gain.linearRampToValueAtTime(this.onplayGain, setTime); this.metric.startListening(audioEngineContext.timer.getTestTime()); this.bufferNode.playbackStartTime = audioEngineContext.timer.getTestTime(); this.interfaceDOM.startPlayback(); + this.playing = true; } }; this.listenStop = function (setTime) { - if (this.outputGain.gain.value !== 0.0) { + if (this.playing === true) { this.outputGain.gain.linearRampToValueAtTime(0.0, setTime); this.metric.stopListening(audioEngineContext.timer.getTestTime(), this.getCurrentPosition()); } this.interfaceDOM.stopPlayback(); + this.playing = false; }; this.setupPlayback = function () {