From 0dffc65ce99307d048f6b9a10b1c31b01ab0133d Mon Sep 17 00:00:00 2001 From: "Michael \"Z\" Goddard" Date: Mon, 25 Jun 2018 15:31:35 -0400 Subject: [PATCH] stop drum immediately if it is still starting (#1266) --- src/extensions/scratch3_music/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extensions/scratch3_music/index.js b/src/extensions/scratch3_music/index.js index 9099dc98a..1ef4d6942 100644 --- a/src/extensions/scratch3_music/index.js +++ b/src/extensions/scratch3_music/index.js @@ -786,7 +786,7 @@ class Scratch3MusicBlocks { if (typeof player === 'undefined') return; - if (player.isPlaying) { + if (player.isPlaying && !player.isStarting) { // Take the internal player state and create a new player with it. // `.play` does this internally but then instructs the sound to // stop. @@ -889,7 +889,7 @@ class Scratch3MusicBlocks { const player = this._instrumentPlayerNoteArrays[inst][note]; - if (player.isPlaying) { + if (player.isPlaying && !player.isStarting) { // Take the internal player state and create a new player with it. // `.play` does this internally but then instructs the sound to // stop.