[squeak-dev] The Inbox: Sound-hjh.16.mcz
Hannes Hirzel
hannes.hirzel at gmail.com
Wed Apr 28 15:45:59 UTC 2010
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 at source.squeak.org
<commits at 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
> !
>
>
>
More information about the Squeak-dev
mailing list
|