Merge pull request #3667 from kchadha/delete-broken-sound-status-on-update

Delete sound.broken when updating the sound buffer
This commit is contained in:
Karishma Chadha 2022-05-25 18:32:15 -04:00 committed by GitHub
commit 044742d064
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;