[squeak-dev] The Inbox: Sound-dtl.67.mcz
David T. Lewis
lewis at mail.msen.com
Thu Dec 12 02:21:26 UTC 2019
On Wed, Dec 11, 2019 at 01:28:08PM +0100, St??phane Rollandin wrote:
> Le 11/12/2019 ?? 12:32, Levente Uzonyi a ??crit??:
> >On Wed, 11 Dec 2019, commits at source.squeak.org wrote:
> >
> >>David T. Lewis uploaded a new version of Sound to project The Inbox:
> >>http://source.squeak.org/inbox/Sound-dtl.67.mcz
> >>
> >>==================== Summary ====================
> >>
> >>Name: Sound-dtl.67
> >>Author: dtl
> >>Time: 10 December 2019, 10:51:04.985835 pm
> >>UUID: ca970845-8428-41f9-b83c-f64a6cc732c1
> >>Ancestors: Sound-eem.66
> >>
> >>Sound mixing improvements by St?phane Rollandin (spfa).
> >>Allow adjusting volume of mixed sounds while playing.
> >>Original discussion at
> >>http://forum.world.st/Adjusting-the-volume-of-a-sound-as-it-s-playing-td5102562.html
> >>Patches posted to squeak-dev at
> >>http://lists.squeakfoundation.org/pipermail/squeak-dev/2019-December/205440.html
> >>
> >>=============== Diff against Sound-eem.66 ===============
> >>
> >>Item was changed:
> >> ----- Method: AbstractSound>>loudness (in category 'volume') -----
> >> loudness
> >> "Answer the current volume setting for this sound."
> >>
> >>+ self hasVolumeEnvelope ifTrue: [^ self volumeEnvelope scale].
> >
> >I don't see #hasVolumeEnvelope and #volumeEnvelope in the Trunk.
>
> Ah, again my own stuff here...
>
> I have
>
> hasVolumeEnvelope
>
> ^ envelopes anySatisfy: [:e | e isKindOf: VolumeEnvelope]
>
> and
>
> volumeEnvelope
>
> ^ envelopes detect: [:e | e isKindOf: VolumeEnvelope]
>
> but those are pretty ugly (isKindOf:)
>
> Stef
Rather than add #hasVolumeEnvelope and #volumeEnvelope, would
this achieve the same thing?
AbstractSound>>loudness
"Answer the current volume setting for this sound."
^ envelopes detect: [:e | e isKindOf: VolumeEnvelope]
ifFound: [ :envelope | envelope scale ]
ifNone: [scaledVol asFloat / ScaleFactor]
Dave
More information about the Squeak-dev
mailing list
|