[squeakland] Request for Help - Question 20100501

Karl Ramberg karlramberg at gmail.com
Tue Jan 5 17:02:24 EST 2010


On 2010-01-05 18:33, Carlos Rabassa wrote:
> This is my request:
>
> http://docs.google.com/View?id=dg7q79cx_668g4d6bqg7
>
>
> Any help will be appreciated.
>
> Carlos Rabassa
> Montevideo, Uruguay

Hi
there is a bug in the system.
SoundService/BaseSoundSystem creates its unique instances without 
leaving a reference as far as I can tell.
When we tell the sound to stop we don't know which sound to stop...

Here is a proposed fix to that:

Player>>beep: anObject
     "Play given sound or at least beep."
     | sound |
     anObject isString
         ifTrue: [sound _ SoundService default soundNamed: anObject.
             SoundPlayer playSound: sound.
             self costume
                 setProperty: #playingSound
                 toValue: sound. ]
         ifFalse: [SoundPlayer resumePlaying: anObject quickStart: true.
             self costume setProperty: #playingSound toValue: anObject]

Karl




More information about the squeakland mailing list