Mercurial > hg > webaudioevaluationtool
comparison ape.js @ 996:902f22e182f6
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 | 62b638aa1849 |
children | 355631b936d3 |
comparison
equal
deleted
inserted
replaced
995:3444a772d19e | 996:902f22e182f6 |
---|---|
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; |