There are two problems related to communication with the get_lag function:
It can't be stopped from its Python implementation.
If the user pauses the music, it keeps recording.
A global status variable could be defined in the C extension. This variable would be exposed to Python with function calls (stop() or pause(), for example).
There are two problems related to communication with the
get_lag
function:A global status variable could be defined in the C extension. This variable would be exposed to Python with function calls (
stop()
orpause()
, for example).