[squeak-dev] The Trunk: Sound-ul.60.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Mar 13 15:00:27 UTC 2017
Levente Uzonyi uploaded a new version of Sound to project The Trunk:
http://source.squeak.org/trunk/Sound-ul.60.mcz
==================== Summary ====================
Name: Sound-ul.60
Author: ul
Time: 13 March 2017, 2:58:01.850611 pm
UUID: 3729fde3-4fa7-4961-85f1-06f8d4f21324
Ancestors: Sound-tfel.59
SortedCollection Whack-a-mole
=============== Diff against Sound-tfel.59 ===============
Item was changed:
----- Method: SampledInstrument>>readSampleSetFrom: (in category 'other') -----
readSampleSetFrom: dirName
"Answer a collection of sounds read from AIFF files in the given directory and sorted in ascending pitch order."
| all dir |
+ all := OrderedCollection new.
- all := SortedCollection sortBlock: [:s1 :s2 | s1 pitch < s2 pitch].
dir := FileDirectory default on: dirName.
dir fileNames do: [:n | | fullName snd |
fullName := dir fullNameFor: n.
UIManager default
informUser: 'Reading AIFF file ', n
during:
[snd := LoopedSampledSound new
fromAIFFFileNamed: fullName
mergeIfStereo: true].
all add: snd].
+ ^ all asArray sort: [:s1 :s2 | s1 pitch < s2 pitch]
- ^ all asArray
!
More information about the Squeak-dev
mailing list
|