AbstractSound bug in 4.1 rc5

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

AbstractSound bug in 4.1 rc5

Stéphane Rollandin
one more bug:

in AbstractSound the method

, aSound
        "Return the concatenation of the receiver and the argument sound."

        ^ SequentialSound new
                add: self;
                add: aSound


...does not work because the method SequentialSound>>#add: has been
modified to return the added sound, instead of the receiver:

add: aSound

        sounds := sounds copyWith: aSound.
        ^aSound


previously (in 3.8 for example) it was:


add: aSound

        sounds _ sounds copyWith: aSound.


Stef



Reply | Threaded
Open this post in threaded view
|

Re: AbstractSound bug in 4.1 rc5

Stéphane Rollandin
and we have the same change in MixedSound>>#add: leading to the same
error in AbstractSound>>+

may be this has something to do with the sounds problem what where
discussed recently ?

anyway the fix is easy, just add a #yourself ...


AbstractSound
+ aSound
        "Return the mix of the receiver and the argument sound."

        ^ MixedSound new
                add: self;
                add: aSound;
                yourself


AbstractSound
, aSound
        "Return the concatenation of the receiver and the argument sound."

        ^ SequentialSound new
                add: self;
                add: aSound;
                yourself


Stef



Reply | Threaded
Open this post in threaded view
|

Re: AbstractSound bug in 4.1 rc5

Nicolas Cellier
Sorry Stephane,
That was me.
I think it is better to have a uniform behaviour: add:return the argument.

Nicolas

2010/4/17 Stéphane Rollandin <[hidden email]>:

> and we have the same change in MixedSound>>#add: leading to the same error
> in AbstractSound>>+
>
> may be this has something to do with the sounds problem what where discussed
> recently ?
>
> anyway the fix is easy, just add a #yourself ...
>
>
> AbstractSound
> + aSound
>        "Return the mix of the receiver and the argument sound."
>
>        ^ MixedSound new
>                add: self;
>                add: aSound;
>                yourself
>
>
> AbstractSound
> , aSound
>        "Return the concatenation of the receiver and the argument sound."
>
>        ^ SequentialSound new
>                add: self;
>                add: aSound;
>                yourself
>
>
> Stef
>
>
>
>