[Pkg] The Trunk: Sound-nice.21.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Aug 22 18:42:30 UTC 2010

Nicolas Cellier uploaded a new version of Sound to project The Trunk:

==================== Summary ====================

Name: Sound-nice.21
Author: nice
Time: 22 August 2010, 8:42:07.138 pm
UUID: b0096a76-1f5a-4ef8-970e-18e46f169ff2
Ancestors: Sound-ul.20

minor change: avoid creating a SortedCollection when not necessary...
asSortedCollection asArray -> asArray sort

=============== Diff against Sound-ul.20 ===============

Item was changed:
  ----- Method: SampledInstrument>>allNotes (in category 'other') -----
  	"Answer a collection containing of all the unique sampled sounds used by this instrument."
  	| r |
  	r := IdentitySet new.
  	r addAll: sustainedLoud.
  	sustainedSoft ~~ sustainedLoud ifTrue: [r addAll: sustainedSoft].
  	staccatoLoud ~~ sustainedLoud ifTrue: [r addAll: staccatoLoud].
  	staccatoSoft ~~ staccatoLoud ifTrue: [r addAll: staccatoSoft].
+ 	^ r asArray sort: [:n1 :n2 | n1 pitch < n2 pitch]
- 	^ (r asSortedCollection: [:n1 :n2 | n1 pitch < n2 pitch]) asArray

More information about the Packages mailing list