Mercurial > hg > webaudioevaluationtool
diff ape.js @ 375:81246d594793 Dev_main
Moved common test options into core.JS
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Mon, 07 Dec 2015 11:18:11 +0000 |
parents | ed22a47dcacd |
children | f49339868324 |
line wrap: on
line diff
--- a/ape.js Mon Dec 07 09:47:26 2015 +0000 +++ b/ape.js Mon Dec 07 11:18:11 2015 +0000 @@ -315,10 +315,7 @@ function loadTest(audioHolderObject) { - - // Reset audioEngineContext.Metric globals for new test - audioEngineContext.newTestPage(); - + var id = audioHolderObject.id; var feedbackHolder = document.getElementById('feedbackHolder'); @@ -385,32 +382,15 @@ commentBoxPrefix = interfaceObj.commentBoxPrefix; } } - - /// CHECK FOR SAMPLE RATE COMPATIBILITY - if (audioHolderObject.sampleRate != undefined) { - if (Number(audioHolderObject.sampleRate) != audioContext.sampleRate) { - var errStr = 'Sample rates do not match! Requested '+Number(audioHolderObject.sampleRate)+', got '+audioContext.sampleRate+'. Please set the sample rate to match before completing this test.'; - alert(errStr); - return; - } - } var commentShow = audioHolderObject.elementComments; var loopPlayback = audioHolderObject.loop; - audioEngineContext.loopPlayback = loopPlayback; - // Create AudioEngine bindings for playback - currentTestHolder = document.createElement('audioHolder'); currentTestHolder.id = audioHolderObject.id; currentTestHolder.repeatCount = audioHolderObject.repeatCount; - // Delete any previous audioObjects associated with the audioEngine - audioEngineContext.audioObjects = []; - interfaceContext.deleteCommentBoxes(); - interfaceContext.deleteCommentQuestions(); - // Find all the audioElements from the audioHolder $(audioHolderObject.audioElements).each(function(index,element){ // Find URL of track