jackclient-python icon indicating copy to clipboard operation
jackclient-python copied to clipboard

Anyway to check if client is activated

Open flappix opened this issue 3 years ago • 2 comments
trafficstars

Hi, I'm facing the problem that my jack client becomes deactivated at some point of my code even if I'm not calling client.deactivate().
When this happens i'm not able to (de)connect any ports registered by my script. I'm just getting an error message from jack_connect

> jack_connect system:capture_1 test:in
cannot connect client, already connected?
>
>jack_disconnect  system:capture_1 test:in 
cannot disconnect client, already disconnected?

I'm having a hard time to debug the script and determine the exact position in the code where this is happening. So I'm looking for any way to check if the client is still activated. I tried client.status which output <jack.Status 0x0: no flags set> regardless if the client is activated or no. I also tried client.set_shutdown_callback (f) but its not executed when the client becomes deactivated.

Any help would be greatly appreciated :)

flappix avatar Feb 17 '22 15:02 flappix

Sorry, I don't really have an idea.

You can try to print something from the process callback, and whenever it stops, the client has probably been deactivated. I know that's not great, but maybe it helps ...

mgeier avatar Feb 22 '22 19:02 mgeier

@flappix if you post a minimal example (so that we don't have to crawl through obstructing code) then we might be able to help with what is happening.

HaHeho avatar Feb 23 '22 12:02 HaHeho