From 04b9996ac7ce1e9eb97d140cddad9b7e50ce4a4e Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Wed, 17 Jan 2018 17:35:33 +0100 Subject: [PATCH] Sorting actions to be performed in chronological order --- src/sound/html5/HTML5AudioSoundManager.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sound/html5/HTML5AudioSoundManager.js b/src/sound/html5/HTML5AudioSoundManager.js index e76b82bee..325c7ddc8 100644 --- a/src/sound/html5/HTML5AudioSoundManager.js +++ b/src/sound/html5/HTML5AudioSoundManager.js @@ -136,6 +136,9 @@ var HTML5AudioSoundManager = new Class({ allSoundsTouchLockedActionQueue_1.push(touchLockedAction); }); }); + allSoundsTouchLockedActionQueue_1.sort(function (tla1, tla2) { + return tla1.time - tla2.time; + }); allSoundsTouchLockedActionQueue_1.forEach(function (touchLockedAction) { switch (touchLockedAction.type) { case 'method':