Mercurial > hg > webaudioevaluationtool
comparison ape.js @ 97:396ee95ad102 Dev_main
Fixed Bug 1204: Multiple clicks creates multiple instances.
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Fri, 01 May 2015 16:07:15 +0100 |
parents | 4c370a73f30f |
children | 1c869162371b |
comparison
equal
deleted
inserted
replaced
96:bdc91af32a33 | 97:396ee95ad102 |
---|---|
399 }; | 399 }; |
400 | 400 |
401 audioEngineContext.selectedTrack = function(id) { | 401 audioEngineContext.selectedTrack = function(id) { |
402 for (var i=0; i<this.audioObjects.length; i++) | 402 for (var i=0; i<this.audioObjects.length; i++) |
403 { | 403 { |
404 if (id == i) { | 404 this.audioObjects[i].outputGain.gain.value = 0.0; |
405 this.audioObjects[i].outputGain.gain.value = 1.0; | 405 this.audioObjects[i].stop(); |
406 this.audioObjects[i].play(audioContext.currentTime+0.01); | |
407 } else { | |
408 this.audioObjects[i].outputGain.gain.value = 0.0; | |
409 this.audioObjects[i].stop(); | |
410 } | |
411 } | 406 } |
407 this.audioObjects[id].outputGain.gain.value = 1.0; | |
408 this.audioObjects[id].play(audioContext.currentTime+0.01); | |
412 }; | 409 }; |
413 } | 410 } |
414 | 411 |
415 currentTestHolder = document.createElement('audioHolder'); | 412 currentTestHolder = document.createElement('audioHolder'); |
416 currentTestHolder.id = textXML.id; | 413 currentTestHolder.id = textXML.id; |