[squeak-dev] The Trunk: Sound-pre.64.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Oct 27 00:35:47 UTC 2017


Patrick Rein uploaded a new version of Sound to project The Trunk:
http://source.squeak.org/trunk/Sound-pre.64.mcz

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

Name: Sound-pre.64
Author: pre
Time: 26 October 2017, 5:35:26.194417 pm
UUID: 1e82fad7-2c1d-ea42-9b55-cfa86185e99b
Ancestors: Sound-eem.63

Enables drag and drop for wave files from the host system.

=============== Diff against Sound-eem.63 ===============

Item was added:
+ ----- Method: SampledSound class>>fileReaderServicesForFile:suffix: (in category 'file reader services') -----
+ fileReaderServicesForFile: fullName suffix: suffix
+ 
+ 	^ (suffix = 'wav')
+ 		ifTrue: [Array with: self serviceLoadingWav]
+ 		ifFalse: [#()]!

Item was added:
+ ----- Method: SampledSound class>>fromDroppedWaveFileNamed: (in category 'file reader services') -----
+ fromDroppedWaveFileNamed: fileName
+ 
+ 	(self fromWaveFileNamed: fileName) explore!

Item was changed:
  ----- Method: SampledSound class>>initialize (in category 'class initialization') -----
  initialize
  	"SampledSound initialize"
  
  	IncrementFractionBits := 16.
  	IncrementScaleFactor := 2 raisedTo: IncrementFractionBits.
  	ScaledIndexOverflow := 2 raisedTo: 29.  "handle overflow before needing LargePositiveIntegers"
  	self useCoffeeCupClink.
  	SoundLibrary ifNil: [SoundLibrary := Dictionary new].
  	Beeper setDefault: (self new
  						setSamples: self coffeeCupClink
  						samplingRate: 12000).
+ 						
+ 	FileServices registerFileReader: self
  !

Item was added:
+ ----- Method: SampledSound class>>serviceLoadingWav (in category 'file reader services') -----
+ serviceLoadingWav
+ 
+ 	^ SimpleServiceEntry 
+ 		provider: self 
+ 		label: 'load as sound'
+ 		selector: #fromDroppedWaveFileNamed:
+ 		description: 'load the sound'
+ 		buttonLabel: 'load as sound'!



More information about the Squeak-dev mailing list