tim Rowledge uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-tpr.2906.mcz==================== Summary ====================
Name: VMMaker.oscog-tpr.2906
Author: tpr
Time: 13 December 2020, 9:07:40.834798 pm
UUID: df432f2d-0ae6-4d4e-9f9b-db364976a138
Ancestors: VMMaker.oscog-eem.2905
Mpeg3Plugin sample read routines expect word arrays,not pointer arrays. Became an issue recently due to Slang changes?
=============== Diff against VMMaker.oscog-eem.2905 ===============
Item was changed:
----- Method: Mpeg3Plugin>>primitiveMPEG3ReReadAudio:shortArray:channel:samples:stream: (in category 'primitives') -----
primitiveMPEG3ReReadAudio: fileHandle shortArray: anArray channel: aChannelNumber samples: aSampleNumber stream: aNumber
| file result arrayBase |
"int mpeg3_reread_audio(mpeg3_t *file,
float *output_f,
short *output_i,
int channel,
long samples,
int stream)"
<var: #file type: 'mpeg3_t * '>
<var: #arrayBase type: 'short * '>
self primitive: 'primitiveMPEG3ReReadAudio'
+ parameters: #(Oop WordArray SmallInteger SmallInteger SmallInteger).
- parameters: #(Oop Array SmallInteger SmallInteger SmallInteger).
file := self mpeg3tValueOf: fileHandle.
file = nil ifTrue: [^0].
aNumber < 0 ifTrue: [interpreterProxy success: false. ^nil].
aNumber >= (self cCode: 'result = mpeg3_total_astreams(file)') ifTrue: [
interpreterProxy success: false. ^0 ].
arrayBase := self cCoerce: anArray to: 'short *'.
interpreterProxy failed ifTrue: [^nil].
self cCode: 'result = mpeg3_reread_audio(file,(float *) NULL,arrayBase,aChannelNumber,aSampleNumber,aNumber)'.
^result asSmallIntegerObj
!
Item was changed:
----- Method: Mpeg3Plugin>>primitiveMPEG3ReadAudio:shortArray:channel:samples:stream: (in category 'primitives') -----
primitiveMPEG3ReadAudio: fileHandle shortArray: anArray channel: aChannelNumber samples: aSampleNumber stream: aNumber
| file result arrayBase |
"int mpeg3_read_audio(mpeg3_t *file,
float *output_f,
short *output_i,
int channel,
long samples,
int stream)"
<var: #file type: 'mpeg3_t * '>
<var: #arrayBase type: 'short * '>
self primitive: 'primitiveMPEG3ReadAudio'
+ parameters: #(Oop WordArray SmallInteger SmallInteger SmallInteger).
- parameters: #(Oop Array SmallInteger SmallInteger SmallInteger).
file := self mpeg3tValueOf: fileHandle.
file = nil ifTrue: [^0].
aNumber < 0 ifTrue: [interpreterProxy success: false. ^nil].
aNumber >= (self cCode: 'result = mpeg3_total_astreams(file)') ifTrue: [
interpreterProxy success: false. ^0 ].
arrayBase := self cCoerce: anArray to: 'short *'.
interpreterProxy failed ifTrue: [^nil].
self cCode: 'result = mpeg3_read_audio(file,(float *) NULL,arrayBase,aChannelNumber,aSampleNumber,aNumber)'.
^result asSmallIntegerObj
!