Karl Ramberg uploaded a new version of Sound to project Etoys: http://source.squeak.org/etoys/Sound-kfr.20.mcz
==================== Summary ====================
Name: Sound-kfr.20 Author: kfr Time: 28 November 2011, 11:17:09 pm UUID: 1406382d-d725-984d-97b9-7fd9ecd1f51f Ancestors: Sound-kfr.19
Fix to SoundLibraryMorph. Make sure contents is up to date.
=============== Diff against Sound-kfr.19 ===============
Item was changed: ----- Method: SoundLibraryTool>>loadSoundFromDisk (in category 'menu') ----- loadSoundFromDisk "Put up a file chooser dialog inviting the user to import a sound file; accept it"
| aSound aName aFileStream fullName ext reply | aFileStream := FileList2 modalFileSelectorForSuffixes: #(#AIFF #aiff #Wave #wav #wave ). aFileStream ifNil: [^ self]. fullName := aFileStream name. ('*.AIFF' match: fullName) ifTrue: [aSound := SampledSound fromAIFFfileNamed: fullName] ifFalse: [aSound := SampledSound fromWaveStream: aFileStream]. aFileStream close. ext := FileDirectory extensionFor: fullName. aName := (FileDirectory on: fullName) pathParts last. ext size > 0 ifTrue: [aName := aName copyFrom: 1 to: (aName size - (ext size + 1))]. [reply := FillInTheBlank request: 'Please give a name for this sound' translated initialAnswer: aName. reply isEmptyOrNil ifTrue: [^ self]. (SampledSound soundLibrary includesKey: reply) ifTrue: [self inform: 'sorry, that name is already taken' translated. false] ifFalse: [true]] whileFalse. + SampledSound addLibrarySoundNamed: reply samples: aSound samples samplingRate: aSound originalSamplingRate. + listBox updateList! - SampledSound addLibrarySoundNamed: reply samples: aSound samples samplingRate: aSound originalSamplingRate!
etoys-dev@lists.squeakfoundation.org