P.S. I do not consider this fix to be a great idea (yet).
The reasons why I have posted this 1) I would like to draw the attention to the class SampledSound (away from 'String', I do not like the idea of putting more things there) 2) I would just like to find out if there are some easy possibilities that we can make the sound library interface a bit more user friendly ('a small sound access DSL)
--Hannes
On Wed, 28 Apr 2010 15:24:24.473 0000, commits@source.squeak.org commits@source.squeak.org wrote:
A new version of Sound was added to project The Inbox: http://source.squeak.org/inbox/Sound-hjh.16.mcz
==================== 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 !
I think there was some discussion going on regarding this.
At the moment I think this contribution should just be deleted.
If I want this I will bring it up again.
--Hannes
On 4/28/10, Hannes Hirzel hannes.hirzel@gmail.com wrote:
P.S. I do not consider this fix to be a great idea (yet).
The reasons why I have posted this
- I would like to draw the attention to the class SampledSound (away
from 'String', I do not like the idea of putting more things there) 2) I would just like to find out if there are some easy possibilities that we can make the sound library interface a bit more user friendly ('a small sound access DSL)
--Hannes
On Wed, 28 Apr 2010 15:24:24.473 0000, commits@source.squeak.org commits@source.squeak.org wrote:
A new version of Sound was added to project The Inbox: http://source.squeak.org/inbox/Sound-hjh.16.mcz
==================== 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 !
squeak-dev@lists.squeakfoundation.org