c-callable
Hello,
We are using a Lisp
function to process MIDI data. The function is defined as c-callable
as explained in the LW Lisp Knowledgebase. There is a C based
framework that installs a CoreMIDI callback function that tries
to call our Lisp callback function.
The system works perfectly
when we simulate MIDI input by calling the C callback function
explicitly from Lisp. This seems to imply that our foreign language
interface is working correctly. However, when we use a CoreMIDI
callback, LW crashes soon after receiving input.
Is there some
threading-related issue we should be aware of? The difference between
the working simulated situation and the crashing MIDI callback case is
primarily that in the simulation, the function is called from the Lisp
main thread, while the callback case calls it from CoreMIDI high
priority thread.
Mikael