[squeak-dev] The Inbox: Sound-wiz.17.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Apr 28 06:32:33 UTC 2010


A new version of Sound was added to project The Inbox:
http://source.squeak.org/inbox/Sound-wiz.17.mcz

==================== Summary ====================

Name: Sound-wiz.17
Author: wiz
Time: 28 April 2010, 2:31:56.883 am
UUID: 0ea1e8e2-7a94-44cd-8db8-5e01002db31a
Ancestors: Sound-nice.15

Ok this is a resubmission of String>>sound.

I have fixed the nits. 

I have discussed why I believe this is the right word rather than asSound on the mailing list. Squeak-dev 2010. I have not heard back from Bert yea of nay. So as not to undermine my own cause I am assuming my arguments were successful.

Usage:

"'click' sound play" will play a click sound from the sound library.
Any name missing from the sound library will return a default sound to be played. Currently the default is the same as Beeper default.

The purpose of the selector is to be a facade to allow access to sounds by name. Currently this only covers the Sampled Sound sound library and the default sound. 

However, the contract is only that
" 'name' sound "
return a playable object. So in the future this could be expanded to check other sound libraries as well before relying on the default.

=============== 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]!




More information about the Squeak-dev mailing list