[Larceny-users] difficulty with callback

David Rush kumoyuki at gmail.com
Tue Jan 26 13:53:43 EST 2010


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



More information about the Larceny-users mailing list