[Etoys] sound player shutdown when initiating painting

Scott Wallace scott.wallace at squeakland.org
Fri Dec 1 01:49:11 EST 2006

Okay, I've modified #stopRunningAll, via update 1134stopSound-sw, so  
that instead of issuing the broadside "SoundPlayer shutDown", the  
individual players in the project are each now told individually to  
stop their sounds.  (There is actually no extra player-enumeration  
overhead in doing this because #stopRunningAll was already iterating  
through a project's players.)

This means that painting sessions, as well as use of the "Stop"  
button, can again be included in event-recordings without fear of  
thereby clobbering sound playback.


   -- Scott

On Nov 30, 2006, at 5:32 AM, Bert Freudenberg wrote:

>> I just noticed that playback of sound using the EventRecorder  
>> stops abruptly if the event-recording includes a painting  
>> session.  Just before the paint palette appears on playback, sound  
>> playback simply stops.
>> I've tracked this down to the recent addition of WorldStethoscope  
>> code, in which a "SoundPlayer shutDown" call was added to  
>> PasteUpMorph >> stopRunningAll.
>> So it seems that either #stopRunningAll should be restored to its  
>> original functionality, which was to suspend all ticking scripts  
>> but not to mess with sound playback, or else we can change the get- 
>> ready-to-paint code so that it no longer calls #stopRunningAll,  
>> but instead calls some to-be-written method that does the original  
>> intended work of #stopRunningAll, but without the additional  
>> clobbering of sound.
>> What do you think?
> I guess this has to do with the addition of a generic sound slot in  
> players. There is a new "sound" category in tile viewers, which  
> allows to start and stop playing a sound of a specific frequency.  
> Very cool in my opinion, I used that for the sound project I sent  
> around.
> Now, if you use that, those sounds would not stop automatically  
> when stopping scripts. They do not even stop when you delete the  
> object, which is a bug I think. So instead of shutting down  
> SoundPlayer, one might want to go through all scripted morphs and  
> only stop their sounds. Or modify the code to have a central  
> registry of playing sounds to avoid iterating through all players.

More information about the Etoys mailing list