[squeak-dev] Adjusting the volume of a sound as it's playing
Stéphane Rollandin
lecteur at zogotounga.net
Sun Aug 18 09:59:59 UTC 2019
>> RepeatingSound should have its own
>> implementation which just passes on to its sound.
>
> Maybe just replace
>
> sound mixSampleCount: count
> into: aSoundBuffer
> startingAt: i
> leftVol: leftVol
> rightVol: rightVol.
>
> with
>
> sound mixSampleCount: count
> into: aSoundBuffer
> startingAt: i
> leftVol: leftVol * scaledVol
> rightVol: rightVol * scaledVol.
>
Hmmm...
Make it
sound mixSampleCount: count
into: aSoundBuffer
startingAt: i
leftVol: leftVol * scaledVol // ScaleFactor
rightVol: rightVol * scaledVol // ScaleFactor.
Stef
More information about the Squeak-dev
mailing list
|