I’m planning to write a small program that connects to the Jack Audio Kit on Linux. Whenever there’s a new audio available to my program, Jack will call the registered callback. According to the documentation, the callback function should enable “real-time execution“.
However, I’d like my program to do some analysis over the data flowing through and displaying this in a window. This is inherently not real-time.
To circumvent this issue, in an exploratory Python script, I used a queue to transfer data into another thread. But although the callback is called, the thread doesn’t receive anything. I suspect this is due to the callback being called in another process. The debugger also doesn’t stop inside the callback.
I saw, there are several applications for Jack that do other non-real-time things like UI and thelike (e.g., volume meter in Cadence). How is it possible to implement this callback without losing the real-time execution property?
Read more here: Source link