Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2788.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2788 Author: eem Time: 14 August 2020, 2:03:27.285203 pm UUID: 415b0c73-efcf-4a0f-b6dc-d7bf2fce2663 Ancestors: VMMaker.oscog-eem.2787 ...and apply it to the SoundPlugin. =============== Diff against VMMaker.oscog-eem.2787 =============== Item was changed: ----- Method: SoundPlugin>>primitiveGetDefaultSoundPlayer (in category 'primitives') ----- primitiveGetDefaultSoundPlayer "Answer a String with the operating system name of the default output device, or nil" "no arguments" <export: true> + self methodReturnStringOrNil: self getDefaultSoundPlayer! - | cDeviceName | - <var: #cDeviceName type: #'char*'> - - "Get the answer." - cDeviceName := self getDefaultSoundPlayer. - cDeviceName = 0 ifTrue: - [^interpreterProxy methodReturnValue: interpreterProxy nilObject]. - - ^interpreterProxy methodReturnString: cDeviceName! Item was changed: ----- Method: SoundPlugin>>primitiveGetDefaultSoundRecorder (in category 'primitives') ----- primitiveGetDefaultSoundRecorder "Answer a String with the operating system name of the default input device, or nil" "no arguments" <export: true> + self methodReturnStringOrNil: self getDefaultSoundRecorder! - | cDeviceName | - <var: #cDeviceName type: #'char*'> - - "Get the answer." - cDeviceName := self getDefaultSoundRecorder. - cDeviceName = 0 ifTrue: - [^interpreterProxy methodReturnValue: interpreterProxy nilObject]. - - ^interpreterProxy methodReturnString: cDeviceName! Item was changed: ----- Method: SoundPlugin>>primitiveGetSoundPlayerDeviceName (in category 'primitives') ----- primitiveGetSoundPlayerDeviceName "arguments: name(type, stack offset) deviceNumber(Integer, 0)" "answers a string or nil" <export: true> + | deviceNumber | - | deviceNumber cDeviceName | - <var: #cDeviceName type: #'char *'> "Parse arguments" interpreterProxy methodArgumentCount = 1 ifFalse: [^interpreterProxy primitiveFailFor: PrimErrBadNumArgs]. deviceNumber := interpreterProxy positive32BitValueOf: (interpreterProxy stackValue: 0). interpreterProxy failed ifTrue: [^interpreterProxy primitiveFailFor: PrimErrBadArgument]. + self methodReturnStringOrNil: (self getSoundPlayerDeviceName: deviceNumber - 1)! - "Get the answer." - cDeviceName := self getSoundPlayerDeviceName: deviceNumber - 1. - cDeviceName = 0 ifTrue: - [^interpreterProxy methodReturnValue: interpreterProxy nilObject]. - - ^interpreterProxy methodReturnString: cDeviceName! Item was changed: ----- Method: SoundPlugin>>primitiveGetSoundRecorderDeviceName (in category 'primitives') ----- primitiveGetSoundRecorderDeviceName "arguments: name(type, stack offset) deviceNumber(Integer, 0)" "answers a string or nil" <export: true> + | deviceNumber | - | deviceNumber cDeviceName | - <var: #cDeviceName type: #'char *'> "Parse arguments" interpreterProxy methodArgumentCount = 1 ifFalse: [^interpreterProxy primitiveFailFor: PrimErrBadNumArgs]. deviceNumber := interpreterProxy positive32BitValueOf: (interpreterProxy stackValue: 0). interpreterProxy failed ifTrue: [^interpreterProxy primitiveFailFor: PrimErrBadArgument]. + self methodReturnStringOrNil: (self getSoundRecorderDeviceName: deviceNumber - 1)! - "Get the answer." - cDeviceName := self getSoundRecorderDeviceName: deviceNumber - 1. - cDeviceName = 0 ifTrue: - [^interpreterProxy methodReturnValue: interpreterProxy nilObject]. - - ^interpreterProxy methodReturnString: cDeviceName! |
Free forum by Nabble | Edit this page |