Mercurial > hg > webaudioevaluationtool
comparison ape.js @ 1734:6b062200a412
Updating dev_main
author | Nicholas Jillings <nickjillings@users.noreply.github.com> |
---|---|
date | Fri, 01 May 2015 15:52:13 +0100 |
parents | 6ee92a6e1f40 |
children | 902f22e182f6 |
comparison
equal
deleted
inserted
replaced
1678:fbbb829cb30b | 1734:6b062200a412 |
---|---|
1 /** | 1 /** |
2 * ape.js | 2 * ape.js |
3 * Create the APE interface | 3 * Create the APE interface |
4 */ | |
5 | |
6 /* | |
7 * | |
8 * WARNING!!! | |
9 * | |
10 * YOU ARE VIEWING THE DEV VERSION. THERE IS NO GUARANTEE THIS WILL BE FULLY FUNCTIONAL | |
11 * | |
12 * WARNING!!! | |
13 * | |
14 */ | 4 */ |
15 | 5 |
16 var currentState; // Keep track of the current state (pre/post test, which test, final test? first test?) | 6 var currentState; // Keep track of the current state (pre/post test, which test, final test? first test?) |
17 // preTest - In preTest state | 7 // preTest - In preTest state |
18 // testRun-ID - In test running, test Id number at the end 'testRun-2' | 8 // testRun-ID - In test running, test Id number at the end 'testRun-2' |
148 | 138 |
149 // Set title to that defined in XML, else set to default | 139 // Set title to that defined in XML, else set to default |
150 if (titleAttr != undefined) { | 140 if (titleAttr != undefined) { |
151 titleSpan.innerHTML = titleAttr.value; | 141 titleSpan.innerHTML = titleAttr.value; |
152 } else { | 142 } else { |
153 titleSpan.innerHTML = 'APE Tool'; | 143 titleSpan.innerHTML = 'Listening test'; |
154 } | 144 } |
155 // Insert the titleSpan element into the title div element. | 145 // Insert the titleSpan element into the title div element. |
156 title.appendChild(titleSpan); | 146 title.appendChild(titleSpan); |
157 | 147 |
158 var pagetitle = document.createElement('div'); | 148 var pagetitle = document.createElement('div'); |
414 if (id == i) { | 404 if (id == i) { |
415 this.audioObjects[i].outputGain.gain.value = 1.0; | 405 this.audioObjects[i].outputGain.gain.value = 1.0; |
416 this.audioObjects[i].play(audioContext.currentTime+0.01); | 406 this.audioObjects[i].play(audioContext.currentTime+0.01); |
417 } else { | 407 } else { |
418 this.audioObjects[i].outputGain.gain.value = 0.0; | 408 this.audioObjects[i].outputGain.gain.value = 0.0; |
409 this.audioObjects[i].stop(); | |
419 } | 410 } |
420 } | 411 } |
421 }; | 412 }; |
422 } | 413 } |
423 | 414 |