[etoys-dev] Etoys: Sound-kfr.10.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Dec 18 01:53:59 EST 2010

Karl Ramberg uploaded a new version of Sound to project Etoys:

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

Name: Sound-kfr.10
Author: kfr
Time: 18 December 2010, 7:53:47 am
UUID: f4a6d8bd-89ed-4c49-96c2-791daa51a000
Ancestors: Sound-bf.9

Honor Prefrerence soundReverb

=============== Diff against Sound-bf.9 ===============

Item was changed:
  ----- Method: SoundPlayer class>>startPlayerProcessBufferSize:rate:stereo:sound: (in category 'player process') -----
  startPlayerProcessBufferSize: bufferSize rate: samplesPerSecond stereo: stereoFlag sound: aSound
  	"Start the sound player process. Terminate the old process, if any."
  	"SoundPlayer startPlayerProcessBufferSize: 1000 rate: 11025 stereo: false"
  	self stopPlayerProcess.
  		ifNil:[ActiveSounds _ OrderedCollection new]
  		ifNotNil:[ActiveSounds _ OrderedCollection with: aSound].
  	Buffer _ SoundBuffer newStereoSampleCount: (bufferSize // 4) * 4.
  	LastBuffer ifNotNil:[LastBuffer _ SoundBuffer basicNew: Buffer basicSize].
  	PlayerSemaphore _ Semaphore forMutualExclusion.
  	SamplingRate _ samplesPerSecond.
  	Stereo _ stereoFlag.
  	ReadyForBuffer _ Semaphore new.
  	SoundSupported _ true. "Assume so"
  	UseReadySemaphore _ true.  "set to false if ready semaphore not supported by VM"
  	self primSoundStartBufferSize: Buffer stereoSampleCount
  		rate: samplesPerSecond
  		stereo: Stereo
  		semaIndex: (Smalltalk registerExternalObject: ReadyForBuffer).
  	"Check if sound start prim was successful"
  	SoundSupported ifFalse:[^self].
  		ifTrue: [PlayerProcess _ [SoundPlayer playLoop] newProcess]
  		ifFalse: [PlayerProcess _ [SoundPlayer oldStylePlayLoop] newProcess].
+ 	Preferences soundReverb
+ 		ifTrue: [self startReverb].
- 	UseReverb ifTrue: [self startReverb].
  	PlayerProcess priority: Processor userInterruptPriority.
  	PlayerProcess resume.!

More information about the etoys-dev mailing list