mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 06:23:37 -05:00
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:
commit
044742d064
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue