Hi,
For those of you who want to build and run squeak on the Rapsberry PI
OS 32 bit version from October, the one based on Debian 12 (bookworm),
and you have a PI 3 or higher, you will still have to remove
--enable-fast-bitblt
from mvm in building/linux32ARMv6/squeak.cog.spur/build
[http://squeak.cog.spur/build]
This is because on PI3 or higher you really do have a 64 bit system,
and, the aarch64 kernel is running. This means that
uname -a
and friends convince us we're running a 64 bit system and the wrong
things happen.
Honestly unless you have a special case it is probably better to just
run the 64 bit version.
cheers
bruce
I've just been making a SqueakMap entry for the WeatherStation (it's been a long time since I last added a package!) and it seems we have some issue with calculating the sha1 checksums.
The attempt to load from SM failed and initially looked like something had prevented the server from responding (the error message was a complaint from HttpUrl>>#normalizeContents:) but the Transcript also shewed
"(http://map.squeak.org/accountbyid/4340a66e-2296-48b7-9aa8-5305d303752f/file…) failed with this exception: Incorrect SHA checksum of file from original URL
Trying server cache instead."
Digging in to the debugger tells us that the smpackagerelease has a sha1 of 1044864536495630331656691098454436905765045645695 but the calculated value for the (correctly!) downloaded install file is 401855207151508086727566629532522206807045316227 - so things start to go wrong in SMPackageRelease>>#correctSha1sum:
Loading some older packages seems to work. Checking the squeakmap web page shows that the sha1 value is indeed 1044864..... Looking at the stored sha1 values for 'Command Shell' for example tells me that they match what is calculated by #correctSha1sum: for the downloaded install scripts. Checking in a 5.3 image for the sha1 of the downloaded install script agrees with my trunk image.
I tried marking the package as 'published' in case I had simply forgotten sometihng; no change
IIRC the SM image is ancient and I could imagine we've changed sometihng that would affect this but this is very odd. I'd almost think line-ends but the script was written and saved in Squeak.
tim
--
tim Rowledge; tim(a)rowledge.org; http://www.rowledge.org/tim
Useful Latin Phrases:- Ventis secundis, tene cursum. = Go with the flow.
Marcel Taeumel uploaded a new version of Sound to project Squeak 6.0:
http://source.squeak.org/squeak60/Sound-mt.90.mcz
==================== Summary ====================
Name: Sound-mt.90
Author: mt
Time: 19 October 2023, 10:46:00.042952 am
UUID: f9b6929a-c5da-7f42-90fe-83d403afcca7
Ancestors: Sound-mt.89
Backport selected fixes for sound support from 6.1alpha (Sound-ct.94 tpr.93 eem.92 eem.91).
Fix the length of WAV files produced by AbstractSound>>storeSampleCount:bigEndian:on:. The old code incorrectly rounded up the output size to the buffer size (2 * samplingRate).
When writing a sound out to a file we need to divide the 'remaining' value by //2 to make the file size correct - otherwise it gets padded out by a lot of 0s
=============== Diff against Sound-mt.89 ===============
Item was changed:
----- Method: AbstractSound>>storeSampleCount:bigEndian:on: (in category 'file i/o') -----
storeSampleCount: samplesToStore bigEndian: bigEndianFlag on: aBinaryStream
"Store my samples on the given stream at the current SoundPlayer sampling rate. If bigFlag is true, then each 16-bit sample is stored most-significant byte first (AIFF files), otherwise it is stored least-significant byte first (WAV files). If self isStereo is true, both channels are stored, creating a stereo file. Otherwise, only the left channel is stored, creating a mono file."
| bufSize stereoBuffer reverseBytes streamDirect |
self reset.
bufSize := (2 * self samplingRate rounded) min: samplesToStore. "two second buffer"
stereoBuffer := SoundBuffer newStereoSampleCount: bufSize.
streamDirect := aBinaryStream isKindOf: StandardFileStream.
reverseBytes := (bigEndianFlag xor: Smalltalk isBigEndian) xor: streamDirect not.
'Storing audio...'
displayProgressFrom: 0 to: samplesToStore during: [:bar | | remaining out |
remaining := samplesToStore.
[remaining > 0] whileTrue: [
bar value: samplesToStore - remaining.
stereoBuffer primFill: 0. "clear the buffer"
self playSampleCount: (bufSize min: remaining) into: stereoBuffer startingAt: 1.
out := self isStereo
ifTrue: [stereoBuffer]
ifFalse: [stereoBuffer extractLeftChannel].
reverseBytes ifTrue: [out reverseEndianness].
streamDirect
+ ifTrue: "optimization for files: write sound buffer directly to file"
+ [aBinaryStream next: (out size // 2 min: remaining// 2) putAll: out startingAt: 1] "size in words"
+ ifFalse: "for non-file streams:"
+ [1 to: (out monoSampleCount min: remaining) do: [:i | aBinaryStream int16: (out at: i)]].
- ifTrue: [ "optimization for files: write sound buffer directly to file"
- aBinaryStream next: (out size // 2) putAll: out startingAt: 1] "size in words"
- ifFalse: [ "for non-file streams:"
- 1 to: out monoSampleCount do: [:i | aBinaryStream int16: (out at: i)]].
remaining := remaining - bufSize]].!
Item was added:
+ ----- Method: AbstractSound>>storeSamples:count:bigEndian:on: (in category 'file i/o') -----
+ storeSamples: samples count: samplesToStore bigEndian: bigEndianFlag on: aBinaryStream
+
+ | reverseBytes streamDirect |
+ streamDirect := aBinaryStream isKindOf: StandardFileStream.
+ reverseBytes := (bigEndianFlag xor: Smalltalk isBigEndian) xor: streamDirect not.
+ reverseBytes ifTrue: [samples reverseEndianness].
+ streamDirect
+ ifTrue: "optimization for files: write sound buffer directly to file"
+ [aBinaryStream next: (samples size // 2 min: samplesToStore // 2) putAll: samples startingAt: 1] "size in words"
+ ifFalse: "for non-file streams:"
+ [1 to: (samples monoSampleCount min: samplesToStore) do: [:i | aBinaryStream int16: (samples at: i)]].
+ reverseBytes ifTrue: [samples reverseEndianness]. "restore to original endianness"!
Item was changed:
----- Method: LoopedSampledSound>>storeSampleCount:bigEndian:on: (in category 'file i/o') -----
storeSampleCount: samplesToStore bigEndian: bigEndianFlag on: aBinaryStream
+ "Store my samples on the given stream at the current SoundPlayer sampling rate. If bigFlag is true, then each 16-bit sample is stored most-significant byte first (AIFF files), otherwise it is stored least-significant byte first (WAV files). If self isStereo is true, both channels are stored, creating a stereo file. Otherwise, only the left channel is stored, creating a mono file."
- "Store my samples on the given stream at the current SoundPlayer sampling rate. If bigFlag is true, then each 16-bit sample is stored most-significant byte first (AIFF files), otherwise it is stored least-significant byte first (WAV files)."
+ (self isStereo or: [scaledIndexIncr ~= LoopIndexScaleFactor]) ifTrue: [
- | reverseBytes |
- (self isStereo or: [self samplingRate ~= originalSamplingRate]) ifTrue: [
^ super storeSampleCount: samplesToStore bigEndian: bigEndianFlag on: aBinaryStream].
"optimization: if I'm not stereo and sampling rates match, just store my buffer"
+ ^ self storeSamples: leftSamples count: samplesToStore bigEndian: bigEndianFlag on: aBinaryStream!
- reverseBytes := bigEndianFlag ~= Smalltalk isBigEndian.
- reverseBytes ifTrue: [leftSamples reverseEndianness].
- (aBinaryStream isKindOf: StandardFileStream)
- ifTrue: [ "optimization for files: write sound buffer directly to file"
- aBinaryStream next: (leftSamples size // 2) putAll: leftSamples startingAt: 1] "size in words"
- ifFalse: [ "for non-file streams:"
- 1 to: leftSamples monoSampleCount do: [:i | aBinaryStream int16: (leftSamples at: i)]].
- reverseBytes ifTrue: [leftSamples reverseEndianness]. "restore to original endianness"
- !
Item was changed:
----- Method: SampledSound>>storeSampleCount:bigEndian:on: (in category 'file i/o') -----
storeSampleCount: samplesToStore bigEndian: bigEndianFlag on: aBinaryStream
"Store my samples on the given stream at the current SoundPlayer sampling rate. If bigFlag is true, then each 16-bit sample is stored most-significant byte first (AIFF files), otherwise it is stored least-significant byte first (WAV files)."
- | reverseBytes |
self samplingRate ~= originalSamplingRate ifTrue: [
^ super storeSampleCount: samplesToStore bigEndian: bigEndianFlag on: aBinaryStream].
+
-
"optimization: if sampling rates match, just store my buffer"
+ ^ self storeSamples: samples count: samplesToStore bigEndian: bigEndianFlag on: aBinaryStream!
- reverseBytes := bigEndianFlag ~= Smalltalk isBigEndian.
- reverseBytes ifTrue: [samples reverseEndianness].
- (aBinaryStream isKindOf: StandardFileStream)
- ifTrue: [ "optimization for files: write sound buffer directly to file"
- aBinaryStream next: (samples size // 2) putAll: samples startingAt: 1] "size in words"
- ifFalse: [ "for non-file streams:"
- 1 to: samples monoSampleCount do: [:i | aBinaryStream int16: (samples at: i)]].
- reverseBytes ifTrue: [samples reverseEndianness]. "restore to original endianness"
- !
Item was changed:
----- Method: SoundPlayer class>>soundQuickStart (in category 'preferences') -----
soundQuickStart
<preference: 'Quickstart Sounds'
category: 'media'
+ description: 'If true, attempt to start playing sounds immediately rather than waiting for the next chance to fill the sound buffers"'
- description: 'If true, attempt to start playing sounds immediately rather than waiting for the next chance to fill the sound bufffers"'
type: #Boolean>
^SoundsShouldStartQuick ifNil: [self defaultQuickStartForPlatform]!
The new Pi5 (mine is supposed to arrive hot from Pi Towers by the end of the week, yay!) is using BookWorm Debian and that means defaulting to Wayland (and PipeWire, and Network Manager, and so on).
Does this need any work in the vm? I mean, sqUnixX11.c has quite a lot of X-looking calls in it. Does PipeWire require a new vm-sound plugin? Or is there a set of trivial to use adaptors and we can just go back to sleep?
tim
--
tim Rowledge; tim(a)rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: PIC: Permute Instruction Codes
Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.348.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-mt.348
Author: mt
Time: 16 October 2023, 9:09:41.218917 am
UUID: 9ca4109b-56e9-a346-b4ca-6fbcffe46713
Ancestors: ToolBuilder-Morphic-mt.347
Fix position of "new directory" button in file-saver dialog. "Cancel" button should be right-most and also consistent with directory-chooser dialog.
=============== Diff against ToolBuilder-Morphic-mt.347 ===============
Item was changed:
----- Method: FileSaverDialog>>buildButtonsWith: (in category 'toolbuilder') -----
buildButtonsWith: builder
+ "add a 'new directory' button to the beginning of the row of buttons"
+ ^ {builder pluggableButtonSpec new
-
- ^ (super buildButtonsWith: builder)
- copyWith:
- (builder pluggableButtonSpec new
model: self;
label: 'New Directory' translated;
color: (self userInterfaceTheme get: #buttonColor for: #DialogWindow);
action: #newDirectoryName;
+ yourself}, (super buildButtonsWith: builder)!
- yourself)!
A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1718.mcz
==================== Summary ====================
Name: Morphic-ct.1718
Author: ct
Time: 24 January 2021, 5:22:59.352273 pm
UUID: f630cc0f-15e2-5642-94f6-6277bb8d7bd4
Ancestors: Morphic-mt.1710
PluggableTextMorph: Fixes #selectAll to keep the current scroll position intact, as it is best practice in most modern editor implementations such as Chromium.
I'm very open to refactoring proposals, but otherwise I don't care if you merge this as-is. :-)
=============== Diff against Morphic-mt.1710 ===============
Item was changed:
----- Method: Editor>>selectAll: (in category 'typing/selecting keys') -----
selectAll: aKeyboardEvent
"select everything, invoked by cmd-a. 1/17/96 sw"
self insertAndCloseTypeIn.
self selectFrom: 1 to: self string size.
+ morph skipOnceScrollSelectionIntoView.
^ true!
Item was changed:
----- Method: PluggableTextMorph>>scrollSelectionIntoView: (in category 'editor access') -----
scrollSelectionIntoView: event
"Scroll my text into view. Due to line composition mechanism, we must never use the right of a character block because the lines last character block right value always comes from a global container and is *not* line specific."
self rememberSelectionInterval.
+ (self valueOfProperty: #skipScrollSelectionIntoView ifAbsent: [false]) ifTrue: [
+ self removeProperty: #skipScrollSelectionIntoView.
+ ^ true].
+
textMorph editor hasSelection
ifFalse: [self scrollToShow: (textMorph editor startBlock withWidth: 1)]
ifTrue: [
self scrollToShow: (textMorph editor startBlock topLeft corner: textMorph editor stopBlock bottomLeft).
self scrollToShow: (textMorph editor pointBlock withWidth: 1). "Ensure text cursor visibility."].
^ true!
Item was added:
+ ----- Method: TextMorph>>skipOnceScrollSelectionIntoView (in category 'as yet unclassified') -----
+ skipOnceScrollSelectionIntoView
+
+ self owner owner setProperty: #skipScrollSelectionIntoView toValue: true.!