[ENH] SoundSystemCleanup-gk ( [et] Tested in 3.7 5707 Image. Beeps
ok. Class comment suggestion. )
goran.krampe at bluefish.se
goran.krampe at bluefish.se
Tue Feb 24 14:25:26 CET 2004
Hi!
Thanks for testing.
hoanga at mac.com wrote:
>
> Filed into a Squeak 3.7 #5707 image on OS X.
> VM Version 3.7.1b2.
>
> Looked over class comments. It is clear to me that Beeper beep
> should be used to make beeps. One thing slightly confusing
> in the example code:
> Beeper setDefault: (self new setSamples: self coffeeCupClink
> samplingRate: 12000)).
>
> This seems a little confusing to me. From carefully reading the comment
> above I get the gist this is supposed to an AbstractSound but if I was
> glancing at this comment I'd assume self was a Beeper. Also why
> are there two parentheses after sampling rate?
Sorry, I cut out the original context and wasn't careful at all. Sorry.
It was earlier a copy from AbstractSound class>>initialize I think.
> Perhaps:
> |snd|
> snd := SampledSound new.
> Beeper setDefault: (snd setSamples: SampledSound coffeeCupClink
> samplingRate: 20000).
>
> This code snippet can easily be highlighted and evaluated so the user
> can get a feeling for how it works.
Yes, much better, thanks. Will fix.
> Testing
> -------
> Tried using Beeper beep. Sound still works. Also successfuly got beeps
> from the following:
> SampleSound beep
> TrashCanMorph playDeleteSound
> TrashCanMorph playMouseEnterSound
> TrashCanMorph playMouseLeaveSound
> EToyCommunicatorMorph playArrivalSound.
> Object beep (with and without deprecated warnings on)
Might be nice to also test these two in combinations:
- Turning sound on/off in Preferences (soundsEnabled)
- Selecting the other facade (DummySoundSystem). Can be done by
"SoundService askForDefault".
Sidenote: The ugly quotes in the choosing-dialog comes from the fact
that BaseSoundSystem and DummySoundSystem actually registers *an
instance* in SoundService, instead of the class. Perhaps we should
improve AppRegistry to simply have "registeredObjects" instead of
"registeredClasses".
regards, Göran
More information about the Squeak-harvest
mailing list