Skip to content

Commit d8e3661

Browse files
Gathering all actions and performing them sequentially
1 parent dc3938e commit d8e3661

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

src/sound/html5/HTML5AudioSoundManager.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,22 @@ var HTML5AudioSoundManager = new Class({
130130
if (this.touchUnlocked) {
131131
this.touchUnlocked = false;
132132
this.touchLocked = false;
133+
var allSoundsTouchLockedActionQueue_1 = [];
134+
this.forEachActiveSound(function (sound) {
135+
sound.touchLockedActionQueue.forEach(function (touchLockedAction) {
136+
allSoundsTouchLockedActionQueue_1.push(touchLockedAction);
137+
});
138+
});
139+
allSoundsTouchLockedActionQueue_1.forEach(function (touchLockedAction) {
140+
switch (touchLockedAction.type) {
141+
case 'method':
142+
touchLockedAction.sound[touchLockedAction.name].apply(touchLockedAction.sound, touchLockedAction.value || []);
143+
break;
144+
case 'property':
145+
touchLockedAction.sound[touchLockedAction.name] = touchLockedAction.value;
146+
break;
147+
}
148+
});
133149
}
134150
BaseSoundManager.prototype.update.call(this);
135151
},

0 commit comments

Comments
 (0)