A 64bit question?

D

David Sibley

I have been trying to implement the music sequencer in the mac
frameworks library. Most of the calls seem to work with the exception of
those that use the "MusicTimeStamp" type. This I think should be cast as
a double or float64. Most of the literature I have read seems to suggest
that Ruby can't fake one of these numbers when calling an external
library. In which case should I look into wrapping the C functions
externally and do the typecasting myself?
 
D

David Sibley

David said:
I have been trying to implement the music sequencer in the mac
frameworks library. Most of the calls seem to work with the exception of
those that use the "MusicTimeStamp" type. This I think should be cast as
a double or float64. Most of the literature I have read seems to suggest
that Ruby can't fake one of these numbers when calling an external
library. In which case should I look into wrapping the C functions
externally and do the typecasting myself?

just solved the problem by declaring a struct

TypeCaster = struct [
"MusicTimeStamp n",
]

then passing num.n below

num = 'module name'::TypeCaster.malloc()
num.n = 0.34
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top