Hi
I have a plugin as follows:
run: hostApi inDev: inDeviceName outDev: outDeviceName rate: sampleRate frames: frames latency: latency
self export: true.
self primitive: 'run' parameters:#(String String String SmallInteger SmallInteger SmallInteger).
(self cCode: 'sdrOpenMainStream(hostApi, inDeviceName, outDeviceName, sampleRate, frames, latency)' inSmalltalk: [false]) ifFalse: [^ interpreterProxy primitiveFail].
When I look at the parameters on the C side the strings are sometimes correct (depending on their length and content) and sometimes have rubbish after them like the terminator is missing. The integers are always ok. Do I have to explicitly terminate the strings?
Thanks for any help.
Bob
*** Confidentiality Notice *** Proprietary/Confidential Information belonging to CGI Group Inc. and its affiliates may be contained in this message. If you are not a recipient indicated or intended in this message (or responsible for delivery of this message to such person), or you think for any reason that this message may have been addressed to you in error, you may not use or copy or deliver this message to anyone else. In such case, you should destroy this message and are asked to notify the sender by reply email.
On 4/2/06, Bob.Cowdery@cgi-europe.com Bob.Cowdery@cgi-europe.com wrote:
self primitive: 'run' parameters:#(String String String SmallInteger SmallInteger
SmallInteger). [...] When I look at the parameters on the C side the strings are sometimes correct (depending on their length and content) and sometimes have rubbish after them like the terminator is missing. The integers are always ok. Do I have to explicitly terminate the strings?
Either that or pass along their length. -- Ragnar
squeak-dev@lists.squeakfoundation.org