[squeak-dev] The Inbox: Sound-hjh.16.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Apr 28 15:24:33 UTC 2010

A new version of Sound was added to project The Inbox:

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

Name: Sound-hjh.16
Author: hjh
Time: 28 April 2010, 3:22:50.121 pm
UUID: 5859af18-61f2-4d48-83c9-f8703d57aeb3
Ancestors: Sound-nice.15

playSoundNamed: aString 

does not play anything if there is no sound with the name 'aString'. The user gets a dialog which is fine. But maybe there should be a sound as well. 

The playing of sounds should be made easier.

SampledSound playSoundNamed: 'hello'

is clumsy.

Something like 
Sound play: 'hello'  

(There is not class sound which is a bit odd, there is AbstractSound and SampledSound for example)

=============== Diff against Sound-nice.15 ===============

Item was changed:
  ----- Method: SampledSound class>>playSoundNamed: (in category 'sound library') -----
  playSoundNamed: aString
  	"Play the sound with given name. Do nothing if there is no sound of that name in the library."
  	"SampledSound playSoundNamed: 'croak'"
  	| snd |
  	snd := self soundNamed: aString.
+ 	snd ifNil: [snd:=Beeper default].
+ 	snd play.
+ 	 ^ snd
- 	snd ifNotNil: [snd play].
- 	^ snd

More information about the Squeak-dev mailing list