From f7e5272618b7b359b136cf7cd97762dd6d765798 Mon Sep 17 00:00:00 2001 From: Karishma Chadha Date: Wed, 25 May 2022 18:23:23 -0400 Subject: [PATCH] Delete sound.broken when updating the sound buffer --- src/virtual-machine.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/virtual-machine.js b/src/virtual-machine.js index 0d2cab346..01cee0443 100644 --- a/src/virtual-machine.js +++ b/src/virtual-machine.js @@ -792,6 +792,7 @@ class VirtualMachine extends EventEmitter { */ updateSoundBuffer (soundIndex, newBuffer, soundEncoding) { const sound = this.editingTarget.sprite.sounds[soundIndex]; + if (sound && sound.broken) delete sound.broken; const id = sound ? sound.soundId : null; if (id && this.runtime && this.runtime.audioEngine) { this.editingTarget.sprite.soundBank.getSoundPlayer(id).buffer = newBuffer;