A new version of Sound was added to project The Inbox:
http://source.squeak.org/inbox/Sound-wiz.16.mcz==================== Summary ====================
Name: Sound-wiz.16
Author: wiz
Time: 17 April 2010, 11:35:32.041 pm
UUID: 5d77f8ac-ffc8-4496-8f5a-06b31e8248e6
Ancestors: Sound-nice.15
This adds String>>#sound.
Typical usage:
"'click' sound play"
The reciever is a string name. Usually a key into
Sound Library.
The answer is a playable object. Usually a sampled sound from the sound library. In the absence of a findable key a default sound will be returned. Currently this is Beeper default.
This method's purpose is to act as a facade for the sound system hiding the details of where the sound is actually stored.
Its contract is to always return something playable.
Conceivably in the future it could check several other dictionaries returning the first playable object found for a key equal to the receiver.
Presently the motivation for the command was to replace the now nuked and formerly deprecated
"Beeper beep: 'click'"
The Beeper class protocol inherited the deprecated method from Object>>class.
This is also my (wiz) Jerome Peaces first attempt to submit a package to the inbox. So in that sense it is a test for me.
Cheers --Jer
=============== Diff against Sound-nice.15 ===============
Item was added:
+ ----- Method: String>>sound (in category '*sound-Synthesis') -----
+ sound
+ "Return a sound. Either from the sound library via SampleSound or else the Beeper default"
+ ^SampledSound soundNamed: self ifAbsent: [ Beeper default ]
+ !