mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 23:12:24 -05:00
stop drum immediately if it is still starting (#1266)
This commit is contained in:
parent
d187517d85
commit
0dffc65ce9
1 changed files with 2 additions and 2 deletions
|
@ -786,7 +786,7 @@ class Scratch3MusicBlocks {
|
||||||
|
|
||||||
if (typeof player === 'undefined') return;
|
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.
|
// Take the internal player state and create a new player with it.
|
||||||
// `.play` does this internally but then instructs the sound to
|
// `.play` does this internally but then instructs the sound to
|
||||||
// stop.
|
// stop.
|
||||||
|
@ -889,7 +889,7 @@ class Scratch3MusicBlocks {
|
||||||
|
|
||||||
const player = this._instrumentPlayerNoteArrays[inst][note];
|
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.
|
// Take the internal player state and create a new player with it.
|
||||||
// `.play` does this internally but then instructs the sound to
|
// `.play` does this internally but then instructs the sound to
|
||||||
// stop.
|
// stop.
|
||||||
|
|
Loading…
Reference in a new issue