# HG changeset patch # User Nicholas Jillings # Date 1432458216 -3600 # Node ID eefec889c62d31f27f2e26936db1adeb5b9d475d # Parent 4f3ddd805ff39552e0a50c205e34915a48d72fef Bug #1225: Start button fix improved so audioEngine is in playing state before the audioObject set to play. More for timings and master gain. diff -r 4f3ddd805ff3 -r eefec889c62d ape.js --- a/ape.js Sun May 24 09:57:35 2015 +0100 +++ b/ape.js Sun May 24 10:03:36 2015 +0100 @@ -482,6 +482,8 @@ // Onclick, switch playback to that track trackSliderObj.onclick = function() { + // Start the test on first click, that way timings are more accurate. + audioEngineContext.play(); // Get the track ID from the object ID var id = Number(this.id.substr(13,2)); // Maximum theoretical tracks is 99! audioEngineContext.metric.sliderPlayed(id); @@ -496,7 +498,6 @@ } } - audioEngineContext.play(); }; canvas.appendChild(trackSliderObj); @@ -730,7 +731,7 @@ var testId = currentState.substr(11,currentState.length-10); currentState = 'testRun-'+testId; //audioEngineContext.timer.startTest(); - audioEngineContext.play(); + //audioEngineContext.play(); } else if (currentState.substr(0,11) == 'testRunPost') { var testId = currentState.substr(12,currentState.length-11);