[Larceny-users] difficulty with callback
Felix Klock
felixluser at pnkfx.org
Tue Jan 26 14:07:20 EST 2010
David-
An error invocation in lib/Ffi/ffi-i386.sch says that the Callback abi has not been implemented for stdcall.
It would be nice to fix, but I do not know when I will be able to spend time on the problem.
(There are two separate implementation problems here: adding stdcall callback support in the low-level code, and extending the high-level surface syntax for callbacks using stdcall. I think neither has been attacked.)
In the meantime, I have filed this as Ticket #660.
https://trac.ccs.neu.edu/trac/larceny/ticket/660
-Felix
On Jan 26, 2010, at 1:53 PM, David Rush wrote:
> Hi there,
>
> In working with this foreign function definition:
>
> (define rtaudio-open-stream
> (foreign-procedure "RTAWOpenStream"
> '(void*
> ; DAC object
> (maybe void*)
> ; output params
> (maybe void*)
> ; input params
> int
> ; audio format
> int
> ; sample rate
> boxed
> ; unsigned int* bufferFrames
> (-> (void* void* unsigned float int void*)
> void) ; callback function needs to be stdcall
> (maybe void*)
> ; user data context
> (maybe void*)
> ; stream options
> )
> 'int
> 'cdecl))
>
> I have encountered what appears t me to be an important question: How
> do I define the callback function's calling convention? I was just
> crawling through the underlying library code and it appears that it is
> expecting a stdcall callback under the cdecl API.
>
> help?
>
> david
> --
> GPG Public key at http://cyber-rush.org/drr/gpg-public-key.txt
>
> _______________________________________________
> Larceny-users mailing list
> Larceny-users at lists.ccs.neu.edu
> https://lists.ccs.neu.edu/bin/listinfo/larceny-users
More information about the Larceny-users
mailing list