Hi all,
it seems in the "official" Squeak VM sound input is broken:
RecordingControls new openInHand
and press record => Error: primGetActualRecordingSampleRate failed
However, an OpenSmalltalk VM that seems identical *does* work.
Pasting the VM versions below. The working one I downloaded from OpenSmalltalk a while ago, the broken one is Squeak 6.0.
What could the difference be?
Vanessa
WORKING:
Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-dtl.3185] 5.20220602.1410 Mac OS X built on Jun 2 2022 16:04:54 UTC Compiler: Apple LLVM 12.0.0 (clang-1200.0.32.29) platform sources revision VM: 202206021410 runner@Mac-1654184818873.local:work/opensmalltalk-vm/opensmalltalk-vm Date: Thu Jun 2 16:10:44 2022 CommitHash: c9fd365 Plugins: 202206021410 runner@Mac-1654184818873.local:work/opensmalltalk-vm/opensmalltalk-vm CoInterpreter VMMaker.oscog-dtl.3185 uuid: 0e7f07b8-eed6-4362-b223-86c98594ddb9 Jun 2 2022 StackToRegisterMappingCogit VMMaker.oscog-mt.3179 uuid: c6fbcb07-2a19-ed4f-8b40-9c119a70882a Jun 2 2022
NOT WORKING:
Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-dtl.3185] 64 bit Mac OS X built on Jun 2 2022 16:04:54 UTC Compiler: Apple LLVM 12.0.0 (clang-1200.0.32.29) platform sources revision VM: 202206021410 runner@Mac-1654184818873.local:work/opensmalltalk-vm/opensmalltalk-vm Date: Thu Jun 2 16:10:44 2022 CommitHash: c9fd365 Plugins: 202206021410 runner@Mac-1654184818873.local:work/opensmalltalk-vm/opensmalltalk-vm CoInterpreter VMMaker.oscog-dtl.3185 uuid: 0e7f07b8-eed6-4362-b223-86c98594ddb9 Jun 2 2022 StackToRegisterMappingCogit VMMaker.oscog-mt.3179 uuid: c6fbcb07-2a19-ed4f-8b40-9c119a70882a Jun 2 2022
Vanessa
I do not have a Mac to test any of this (so hopefully someone else can give a better answer). But I did unpack the VMs on my Linux system to see if I could spot any differences. Here is what I see.
I downloaded the Squeak 6 AllInOne release from squeak.org:
https://files.squeak.org/6.0/Squeak6.0-22104-64bit/Squeak6.0-22104-64bit-202206021410-macOS.dmg
And the corresponding(?) VM from opensmalltalk-vm:
I unpacked these disk images on Linux to compare the files. The sound primitives are present in the main Squeak VM executable, but indeed there is a difference in the symbols present in each:
$ strings ./AllInOneDownload/tmp/Squeak6.0-22104-64bit-202206021410-macOS/Squeak6.0-22104-64bit.app/Contents/MacOS/Squeak | grep GetRecordingSampleRate primitiveSoundGetRecordingSampleRate snd_GetRecordingSampleRate _snd_GetRecordingSampleRate _primitiveSoundGetRecordingSampleRate -[sqSqueakSoundCoreAudio snd_GetRecordingSampleRate] _primitiveSoundGetRecordingSampleRate -[sqSqueakSoundCoreAudio snd_GetRecordingSampleRate] _snd_GetRecordingSampleRate primitiveSoundGetRecordingSampleRate snd_GetRecordingSampleRate _snd_GetRecordingSampleRate _primitiveSoundGetRecordingSampleRate -[sqSqueakSoundCoreAudio snd_GetRecordingSampleRate] _primitiveSoundGetRecordingSampleRate -[sqSqueakSoundCoreAudio snd_GetRecordingSampleRate] _snd_GetRecordingSampleRate
$ strings ./OSVMDownload/squeak.cog.spur_macos64x64/Squeak.app/Contents/MacOS/Squeak | grep GetRecordingSampleRate primitiveSoundGetRecordingSampleRate snd_GetRecordingSampleRate _snd_GetRecordingSampleRate _primitiveSoundGetRecordingSampleRate -[sqSqueakSoundCoreAudio snd_GetRecordingSampleRate] _primitiveSoundGetRecordingSampleRate -[sqSqueakSoundCoreAudio snd_GetRecordingSampleRate] _snd_GetRecordingSampleRate
The AllInOne VM appears to have two copies of the sound primitives, while the OSVM download has one copy of the sound primitives.
At this point I am totally guessing, but if the OSX VM is similar to the Unix VM, it may support multiple alternative sound systems (Linux is notorious for this, and there are several VM loadable sound modules available). If so, then perhaps the AllInOne VM is supporting two possible sound interfaces, and perhaps also it is configured to point to the "wrong" one.
Or maybe it is just two different executable formats, if I recall right there may be some Mac executable format that supports different CPUs in a single executable file.
This is definitely way too much speculation on my part but hopefully it will prompt a better answer from someone more familiar with Mac.
After all, nothing beats a wrong answer on the internet to provoke a lively discussion ;-)
Dave
On Wed, Jan 3 2024 at 04:14:28 PM -0800, Vanessa Freudenberg vanessa@codefrau.net wrote:
Hi all,
it seems in the "official" Squeak VM sound input is broken:
RecordingControls new openInHand
and press record => Error: primGetActualRecordingSampleRate failed
However, an OpenSmalltalk VM that seems identical /does/ work.
Pasting the VM versions below. The working one I downloaded from OpenSmalltalk a while ago, the broken one is Squeak 6.0.
What could the difference be?
Vanessa
WORKING:
Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-dtl.3185] 5.20220602.1410 Mac OS X built on Jun 2 2022 16:04:54 UTC Compiler: Apple LLVM 12.0.0 (clang-1200.0.32.29) platform sources revision VM: 202206021410 runner@Mac-1654184818873.local:work/opensmalltalk-vm/opensmalltalk-vm Date: Thu Jun 2 16:10:44 2022 CommitHash: c9fd365 Plugins: 202206021410 runner@Mac-1654184818873.local:work/opensmalltalk-vm/opensmalltalk-vm CoInterpreter VMMaker.oscog-dtl.3185 uuid: 0e7f07b8-eed6-4362-b223-86c98594ddb9 Jun 2 2022 StackToRegisterMappingCogit VMMaker.oscog-mt.3179 uuid: c6fbcb07-2a19-ed4f-8b40-9c119a70882a Jun 2 2022
NOT WORKING:
Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-dtl.3185] 64 bit Mac OS X built on Jun 2 2022 16:04:54 UTC Compiler: Apple LLVM 12.0.0 (clang-1200.0.32.29) platform sources revision VM: 202206021410 runner@Mac-1654184818873.local:work/opensmalltalk-vm/opensmalltalk-vm Date: Thu Jun 2 16:10:44 2022 CommitHash: c9fd365 Plugins: 202206021410 runner@Mac-1654184818873.local:work/opensmalltalk-vm/opensmalltalk-vm CoInterpreter VMMaker.oscog-dtl.3185 uuid: 0e7f07b8-eed6-4362-b223-86c98594ddb9 Jun 2 2022 StackToRegisterMappingCogit VMMaker.oscog-mt.3179 uuid: c6fbcb07-2a19-ed4f-8b40-9c119a70882a Jun 2 2022
Vanessa
squeak-dev@lists.squeakfoundation.org