Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
A 64bit question?
David Sibley
3/31/2009 11:31:00 AM
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?
--
Posted via
http://www.ruby-...
.
1 Answer
David Sibley
4/2/2009 10:46:00 AM
0
David Sibley wrote:
> 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
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
A 64bit question?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password