stop drum immediately if it is still starting (#1266)

This commit is contained in:
Michael "Z" Goddard 2018-06-25 15:31:35 -04:00 committed by Eric Rosenbaum
parent d187517d85
commit 0dffc65ce9

View file

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