raspberrypi / scratch

Scratch releases
79 stars 21 forks source link

"stop all sounds" is not working #225

Closed heppg closed 8 years ago

heppg commented 8 years ago

play a sound (e.g. 'cave' from 'music loops') after a short while, execute 'stop all sounds' Problem: the sound is not stopped

But when all scripts are stopped by red button, the sound is stopped too.

timrowledge commented 8 years ago

That's interestingly odd. It isn't related to the 'wrong-vm-released' problem #224 so I wonder...

heppg commented 8 years ago

One of the kids in school found this on the may-16-release and I doublechecked on current release.

On 07.10.2016 22:04, tim Rowledge wrote:

That's interestingly odd. It isn't related to the 'wrong-vm-released' problem #224 https://github.com/raspberrypi/scratch/issues/224 so I wonder...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/raspberrypi/scratch/issues/225#issuecomment-252348469, or mute the thread https://github.com/notifications/unsubscribe-auth/AE_2C6GG6timX7rnD-KUFRj5JjMQtfg5ks5qxqXogaJpZM4KRDAs.

timrowledge commented 8 years ago

That was interestingly weird.

In old Scratch we used ScratchStageMorph>>stopAllSounds SoundPlayer shutDown. self mididAllNotesOff

and that relied - wrongly - on the #shutDown method that is intended to stop sounds and clean up any external resources before quitting. In more recent Squeak systems a different path to releasing resources is used and the shutDown did nothing at all.

Simply using the more precise SoundPlayer stopPlayingAll makes the block work correctly.

timrowledge commented 8 years ago

Fixed in NuScratch-tpr.373