[squeak-dev] The Trunk: Sound-mt.48.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Apr 6 08:26:11 UTC 2016


Marcel Taeumel uploaded a new version of Sound to project The Trunk:
http://source.squeak.org/trunk/Sound-mt.48.mcz

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

Name: Sound-mt.48
Author: mt
Time: 6 April 2016, 10:26:04.738834 am
UUID: 9b0c8653-4931-ae42-a0ef-e0ca761dc54e
Ancestors: Sound-tpr.47

Fixes sound playing in the way that it goes through the sound service to ensure sound preferences.

=============== Diff against Sound-tpr.47 ===============

Item was changed:
  ----- Method: AbstractSound>>play (in category 'playing') -----
  play
+ 	"Play this sound to the sound output port in real time. Use the sound service to check for sound preferences."
- 	"Play this sound to the sound output port in real time."
  
+ 	SoundService play: self.!
- 	SoundPlayer playSound: self.!

Item was changed:
  ----- Method: AbstractSound>>playAndWaitUntilDone (in category 'playing') -----
  playAndWaitUntilDone
  	"Play this sound to the sound ouput port and wait until it has finished playing before returning."
  
+ 	self play.
- 	SoundPlayer playSound: self.
  	[self samplesRemaining > 0] whileTrue.
  	(Delay forMilliseconds: 2 * SoundPlayer bufferMSecs) wait.  "ensure last buffer has been output"
  !

Item was changed:
  ----- Method: BaseSoundSystem>>beep (in category 'playing') -----
  beep
  	"There is sound support, so we use the default
  	sampled sound for a beep."
  
+ 	^ SampledSound beep!
- 	SoundService soundEnabled ifTrue: [
- 		SampledSound beep]!

Item was changed:
  ----- Method: BaseSoundSystem>>playSampledSound:rate: (in category 'playing') -----
  playSampledSound: samples rate: rate
  
+ 	^ (SampledSound samples: samples samplingRate: rate) play!
- 	SoundService soundEnabled ifTrue: [
- 		(SampledSound samples: samples samplingRate: rate) play]!

Item was added:
+ ----- Method: BaseSoundSystem>>playSound: (in category 'playing') -----
+ playSound: sound
+ 
+ 	SoundPlayer playSound: sound.
+ 	^ sound!

Item was changed:
  ----- Method: BaseSoundSystem>>playSoundNamed: (in category 'playing') -----
  playSoundNamed: soundName
  	"There is sound support, so we play the given sound."
  
+ 	^ SampledSound playSoundNamed: soundName asString!
- 	SoundService soundEnabled ifTrue: [
- 		SampledSound playSoundNamed: soundName asString]!

Item was changed:
  ----- Method: BaseSoundSystem>>playSoundNamed:ifAbsentReadFrom: (in category 'playing') -----
  playSoundNamed: soundName ifAbsentReadFrom: aifFileName
  
+ 	(SampledSound soundNames includes: soundName) ifFalse: [
+ 		(FileDirectory default fileExists: aifFileName) ifTrue: [
+ 			SampledSound
+ 				addLibrarySoundNamed: soundName
+ 				fromAIFFfileNamed: aifFileName]].
+ 		
+ 	(SampledSound soundNames includes: soundName) ifTrue: [
+ 		^ SampledSound playSoundNamed: soundName].
+ 	
+ 	^ nil!
- 	SoundService soundEnabled ifTrue: [
- 		(SampledSound soundNames includes: soundName) ifFalse: [
- 			(FileDirectory default fileExists: aifFileName) ifTrue: [
- 				SampledSound
- 					addLibrarySoundNamed: soundName
- 					fromAIFFfileNamed: aifFileName]].
- 		(SampledSound soundNames includes: soundName) ifTrue: [
- 			SampledSound playSoundNamed: soundName]]!

Item was changed:
  ----- Method: BaseSoundSystem>>playSoundNamedOrBeep: (in category 'playing') -----
  playSoundNamedOrBeep: soundName
  	"There is sound support, so we play the given sound
  	instead of beeping."
  
+ 	^ self playSoundNamed: soundName!
- 	SoundService soundEnabled ifTrue: [
- 		^self playSoundNamed: soundName]!



More information about the Squeak-dev mailing list