Closed ghost closed 8 years ago
The PerfThread class does a great deal of synchronizing access to the Csound running in a thread. I looked on how to implement a callback functions in Python that could be passed to C code [1], but don't have the idea after skimming the docs.
In the actual code there are two examples of setting callback functions: setFileOpenCallback (line 517) and setPlayOpenCallback (line 678). Corresponding member variables are set in the init method (lines 195, 196) to prevent callback references to be garbage collected.
I plan to write a pure python CsPerfThread class emulating the C++ class and whose methods will call corresponding pure C API functions (like do the original C++ class methods!). This would suppress one indirection level caused by a C wrapper of the C++ class.
Hi Francois!
I'm Eugene from the mailing list. How do you plan to proceed with running Csound in the separate thread? That's currently the main thing that concerns me. Maybe Mike's idea with creating a wrapper for C++ class was good, what do you think?
Best, Eugene