tim Rowledge uploaded a new version of Sound to project The Trunk:
http://source.squeak.org/trunk/Sound-tpr.47.mcz
==================== Summary ====================
Name: Sound-tpr.47
Author: tpr
Time: 15 December 2015, 4:33:09.091 pm
UUID: 998878c2-2ae5-41e1-b60a-dbc169c238cd
Ancestors: Sound-nice.46
Protect SoundRecorder from primitiveFailed inside a critical block; raise a Warning signal afterwards instead of a raw error
=============== Diff against Sound-nice.46 ===============
Item was changed:
----- Method: SoundRecorder>>primStartRecordingDesiredSampleRate:stereo:semaIndex: (in category 'primitives') -----
primStartRecordingDesiredSampleRate: samplesPerSec stereo: stereoFlag semaIndex: anInteger
+ "Start sound recording with the given stereo setting. Use a sampling rate as close to the desired rate as the underlying platform will support. If the given semaphore index is > 0, it is taken to be the index of a Semaphore in the external objects array to be signalled every time a recording buffer is filled.
+ We do *not* raise a primitiveFailed error here since this prim is called insdied a critical blcok and that often makes things painful. The only really likely case where this prim fails is a linux machine with no sound input hardware (a Raspberry Pi for example). See the startRecording method for how the failure is handled"
- "Start sound recording with the given stereo setting. Use a sampling rate as close to the desired rate as the underlying platform will support. If the given semaphore index is > 0, it is taken to be the index of a Semaphore in the external objects array to be signalled every time a recording buffer is filled."
<primitive: 'primitiveSoundStartRecording' module: 'SoundPlugin'>
+ "self primitiveFailed"
- self primitiveFailed
!
Item was changed:
----- Method: SoundRecorder>>startRecording (in category 'recording controls') -----
startRecording
+ "Turn on the sound input driver and start the recording process. Initially, recording is paused.
+ If the primStartRecordingDesiredSampleRate:... fails it almost certainly means we have no usable
+ sound input device. Rather than having the prim raise a failure error we let it quietly do nothing
+ (since I hate trying to debug errors inside a critical block) and check the actual sampling rate later.
+ If the sampling rate is 0 we know the startup failed and raise an application level Signal to let any
+ user code know about the problem.
+ You might think we should also use the stopRecording message to close things down cleanly but
+ that simply results in astorm of attempts to start recording so it is simpler to let it be deluded. An
+ attempts to start recording will repeat the test and thereby handle any plug-in hardware etc."
- "Turn of the sound input driver and start the recording process. Initially, recording is paused."
recordLevel ifNil: [recordLevel := 0.5]. "lazy initialization"
CanRecordWhilePlaying ifFalse: [SoundPlayer shutDown].
recordProcess ifNotNil: [self stopRecording].
paused := true.
meteringBuffer := SoundBuffer newMonoSampleCount: 1024.
meterLevel := 0.
self allocateBuffer.
Smalltalk newExternalSemaphoreDo: [ :semaphore :index |
bufferAvailableSema := semaphore.
self primStartRecordingDesiredSampleRate: samplingRate asInteger
stereo: stereo
semaIndex: index ].
RecorderActive := true.
samplingRate := self primGetActualRecordingSampleRate.
+ samplingRate = 0 ifTrue: [ Warning signal: 'SoundRecorder: unable to connect to sound input device'].
self primSetRecordLevel: (1000.0 * recordLevel) asInteger.
recordProcess := [self recordLoop] newProcess.
recordProcess priority: Processor userInterruptPriority.
recordProcess resume!
tim Rowledge uploaded a new version of Sound to project The Trunk:
http://source.squeak.org/trunk/Sound-tpr.47.mcz
==================== Summary ====================
Name: Sound-tpr.47
Author: tpr
Time: 15 December 2015, 4:33:09.091 pm
UUID: 998878c2-2ae5-41e1-b60a-dbc169c238cd
Ancestors: Sound-nice.46
Protect SoundRecorder from primitiveFailed inside a critical block; raise a Warning signal afterwards instead of a raw error
=============== Diff against Sound-nice.46 ===============
Item was changed:
----- Method: SoundRecorder>>primStartRecordingDesiredSampleRate:stereo:semaIndex: (in category 'primitives') -----
primStartRecordingDesiredSampleRate: samplesPerSec stereo: stereoFlag semaIndex: anInteger
+ "Start sound recording with the given stereo setting. Use a sampling rate as close to the desired rate as the underlying platform will support. If the given semaphore index is > 0, it is taken to be the index of a Semaphore in the external objects array to be signalled every time a recording buffer is filled.
+ We do *not* raise a primitiveFailed error here since this prim is called insdied a critical blcok and that often makes things painful. The only really likely case where this prim fails is a linux machine with no sound input hardware (a Raspberry Pi for example). See the startRecording method for how the failure is handled"
- "Start sound recording with the given stereo setting. Use a sampling rate as close to the desired rate as the underlying platform will support. If the given semaphore index is > 0, it is taken to be the index of a Semaphore in the external objects array to be signalled every time a recording buffer is filled."
<primitive: 'primitiveSoundStartRecording' module: 'SoundPlugin'>
+ "self primitiveFailed"
- self primitiveFailed
!
Item was changed:
----- Method: SoundRecorder>>startRecording (in category 'recording controls') -----
startRecording
+ "Turn on the sound input driver and start the recording process. Initially, recording is paused.
+ If the primStartRecordingDesiredSampleRate:... fails it almost certainly means we have no usable
+ sound input device. Rather than having the prim raise a failure error we let it quietly do nothing
+ (since I hate trying to debug errors inside a critical block) and check the actual sampling rate later.
+ If the sampling rate is 0 we know the startup failed and raise an application level Signal to let any
+ user code know about the problem.
+ You might think we should also use the stopRecording message to close things down cleanly but
+ that simply results in astorm of attempts to start recording so it is simpler to let it be deluded. An
+ attempts to start recording will repeat the test and thereby handle any plug-in hardware etc."
- "Turn of the sound input driver and start the recording process. Initially, recording is paused."
recordLevel ifNil: [recordLevel := 0.5]. "lazy initialization"
CanRecordWhilePlaying ifFalse: [SoundPlayer shutDown].
recordProcess ifNotNil: [self stopRecording].
paused := true.
meteringBuffer := SoundBuffer newMonoSampleCount: 1024.
meterLevel := 0.
self allocateBuffer.
Smalltalk newExternalSemaphoreDo: [ :semaphore :index |
bufferAvailableSema := semaphore.
self primStartRecordingDesiredSampleRate: samplingRate asInteger
stereo: stereo
semaIndex: index ].
RecorderActive := true.
samplingRate := self primGetActualRecordingSampleRate.
+ samplingRate = 0 ifTrue: [ Warning signal: 'SoundRecorder: unable to connect to sound input device'].
self primSetRecordLevel: (1000.0 * recordLevel) asInteger.
recordProcess := [self recordLoop] newProcess.
recordProcess priority: Processor userInterruptPriority.
recordProcess resume!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1059.mcz
==================== Summary ====================
Name: Morphic-mt.1059
Author: mt
Time: 10 December 2015, 9:49:58.039 am
UUID: cbaef52e-fd80-4151-9a73-53b4eededc97
Ancestors: Morphic-tpr.1058
Fixes bug regarding the scaling of 8-bit color forms.
=============== Diff against Morphic-tpr.1058 ===============
Item was changed:
----- Method: Form>>scaledIntoFormOfSize:smoothing: (in category '*Morphic') -----
scaledIntoFormOfSize: aNumberOrPoint smoothing: factor
"Scale and center the receiver into a form of a given size"
| extent scaledForm result |
extent := aNumberOrPoint asPoint.
extent = self extent ifTrue: [^ self copy].
scaledForm := self scaledToSize: extent smoothing: factor.
+ result := self species extent: extent depth: self depth.
- result := self species extent: extent depth: 32.
result getCanvas
translucentImage: scaledForm
at: extent - scaledForm extent // 2.
^ result
!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1059.mcz
==================== Summary ====================
Name: Morphic-mt.1059
Author: mt
Time: 10 December 2015, 9:49:58.039 am
UUID: cbaef52e-fd80-4151-9a73-53b4eededc97
Ancestors: Morphic-tpr.1058
Fixes bug regarding the scaling of 8-bit color forms.
=============== Diff against Morphic-tpr.1058 ===============
Item was changed:
----- Method: Form>>scaledIntoFormOfSize:smoothing: (in category '*Morphic') -----
scaledIntoFormOfSize: aNumberOrPoint smoothing: factor
"Scale and center the receiver into a form of a given size"
| extent scaledForm result |
extent := aNumberOrPoint asPoint.
extent = self extent ifTrue: [^ self copy].
scaledForm := self scaledToSize: extent smoothing: factor.
+ result := self species extent: extent depth: self depth.
- result := self species extent: extent depth: 32.
result getCanvas
translucentImage: scaledForm
at: extent - scaledForm extent // 2.
^ result
!
Tobias Pape uploaded a new version of Installer-Core to project The Trunk:
http://source.squeak.org/trunk/Installer-Core-topa.402.mcz
==================== Summary ====================
Name: Installer-Core-topa.402
Author: topa
Time: 8 December 2015, 9:41:01.27 pm
UUID: 99770767-224c-4cc1-98ba-70a62d979822
Ancestors: Installer-Core-topa.401
This won't work in any way.
Until we have a good way integrating
Installer/SqueakMap and Metacello, remove this as it is confusing and unhelpful.
=============== Diff against Installer-Core-topa.401 ===============
Item was removed:
- ----- Method: Installer>>fuel (in category 'package-definitions') -----
- fuel
- "Serialization package."
- ^ { #ss3 -> 'Fuel'.
- 'ConfigurationOfFuel' }!
Tobias Pape uploaded a new version of Installer-Core to project The Trunk:
http://source.squeak.org/trunk/Installer-Core-topa.402.mcz
==================== Summary ====================
Name: Installer-Core-topa.402
Author: topa
Time: 8 December 2015, 9:41:01.27 pm
UUID: 99770767-224c-4cc1-98ba-70a62d979822
Ancestors: Installer-Core-topa.401
This won't work in any way.
Until we have a good way integrating
Installer/SqueakMap and Metacello, remove this as it is confusing and unhelpful.
=============== Diff against Installer-Core-topa.401 ===============
Item was removed:
- ----- Method: Installer>>fuel (in category 'package-definitions') -----
- fuel
- "Serialization package."
- ^ { #ss3 -> 'Fuel'.
- 'ConfigurationOfFuel' }!