thank you for your very interesting answer! I'm currently investigating the problem from another angle: there seems to be a "non-callback API" within the JACK API! I'll see if it solves the problem.
Tom Excerpts from Thomas Chust's message of jeu. mars 31 14:06:15 +0200 2011: > 2011/3/31 Tomtom <[email protected]>: > > [...] > > quick summary: a jack client have to set a callback so the jack > > server can call it when the client is supposed to do > > something. Here, the callback call is supposed to trigger some > > scheme code execution. > > [...] > > Hello, > > the problem is that callbacks only work if the call from C to Scheme > happens in the dynamic scope of a call from Scheme to C that uses a > foreign-safe-lambda. Anything else is bound to break. > > If you have C code that calls registered callbacks at random points in > time, perhaps even on a different thread, you're out of luck. I don't > know the jack API, but your example hints that either jack_activate > should be a foreign-safe-lambda that never returns until some main > loop is terminated, or you *are* out of luck. > > Your only option in the out of luck situation is not to use regular > callbacks at all but to implement a sort of in-process remote > procedure call system where a C stub registered as a callback > transfers call information to a Scheme thread, waits for a reply from > there and then returns. Needless to say, this can be relatively tricky > to implement. > > Ciao, > Thomas > _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
