Mercurial > hg > webaudioevaluationtool
changeset 1737:99ae5f9d9333
Fixed Bug 1205: Stop/start button now has full control in non-loop mode.
author | Nicholas Jillings <nickjillings@users.noreply.github.com> |
---|---|
date | Fri, 01 May 2015 16:18:25 +0100 |
parents | 88bae176ad02 |
children | f3c7351233fa |
files | ape.js |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/ape.js Fri May 01 16:14:08 2015 +0100 +++ b/ape.js Fri May 01 16:18:25 2015 +0100 @@ -388,11 +388,9 @@ audioEngineContext.stop = function() { // Send stop and reset command to all playback buffers if (this.status == 1) { - if (this.loopPlayback) { - for (var i=0; i<this.audioObjects.length; i++) - { - this.audioObjects[i].stop(); - } + for (var i=0; i<this.audioObjects.length; i++) + { + this.audioObjects[i].stop(); } this.status = 0; } @@ -404,8 +402,10 @@ this.audioObjects[i].outputGain.gain.value = 0.0; this.audioObjects[i].stop(); } - this.audioObjects[id].outputGain.gain.value = 1.0; - this.audioObjects[id].play(audioContext.currentTime+0.01); + if (this.status == 1) { + this.audioObjects[id].outputGain.gain.value = 1.0; + this.audioObjects[id].play(audioContext.currentTime+0.01); + } }; }