# HG changeset patch # User Nicholas Jillings # Date 1429552206 -3600 # Node ID 820805ac7326bdbdbd6ff2e242319a21bf52a4c5 # Parent ab56aa2fe06451629ce088cf2a718b3b097f9bea Bug fix: Randomisation causes system not to load new audio elements when progressing through pages diff -r ab56aa2fe064 -r 820805ac7326 ape.js --- a/ape.js Sat Apr 18 15:36:10 2015 +0100 +++ b/ape.js Mon Apr 20 18:50:06 2015 +0100 @@ -428,6 +428,7 @@ else {randomise = false;} var audioElements = $(textXML).find('audioElements'); + currentTrackOrder = []; audioElements.each(function(index,element){ // Find any blind-repeats // Not implemented yet, but just incase @@ -437,6 +438,9 @@ currentTrackOrder = randomiseOrder(currentTrackOrder); } + // Delete any previous audioObjects associated with the audioEngine + audioEngineContext.audioObjects = []; + // Find all the audioElements from the audioHolder $(currentTrackOrder).each(function(index,element){ // Find URL of track diff -r ab56aa2fe064 -r 820805ac7326 apeTool.html --- a/apeTool.html Sat Apr 18 15:36:10 2015 +0100 +++ b/apeTool.html Mon Apr 20 18:50:06 2015 +0100 @@ -33,7 +33,7 @@