Mercurial > hg > webaudioevaluationtool
changeset 2529:21110fddb0af
Fix for #159
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Wed, 09 Nov 2016 13:38:01 +0000 |
parents | 70a319ff302e |
children | 6461c2012340 af8570f0e8dc c0854362d09d |
files | js/core.js |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/js/core.js Wed Nov 09 13:30:31 2016 +0000 +++ b/js/core.js Wed Nov 09 13:38:01 2016 +0000 @@ -1844,10 +1844,10 @@ this.outputGain.gain.cancelScheduledValues(audioContext.currentTime); if (!audioEngineContext.loopPlayback || !audioEngineContext.synchPlayback) { this.metric.startListening(audioEngineContext.timer.getTestTime()); - this.outputGain.gain.setValueAtTime(this.onplayGain, startTime); + this.outputGain.gain.linearRampToValueAtTime(this.onplayGain, startTime + specification.crossFade); this.interfaceDOM.startPlayback(); } else { - this.outputGain.gain.setValueAtTime(0.0, startTime); + this.outputGain.gain.linearRampToValueAtTime(0.0, startTime); } if (audioEngineContext.loopPlayback) { this.bufferNode.loopStart = this.specification.startTime || 0; @@ -1867,7 +1867,7 @@ this.bufferNode.stop(stopTime); this.bufferNode = undefined; } - this.outputGain.gain.setValueAtTime(0.0, stopTime); + this.outputGain.gain.linearRampToValueAtTime(0.0, stopTime); this.interfaceDOM.stopPlayback(); };