Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client objects on multiple servers don't pull correct port lists? #46

Open
jebofponderworthy opened this issue Jan 23, 2018 · 2 comments
Labels

Comments

@jebofponderworthy
Copy link

jebofponderworthy commented Jan 23, 2018

The following code snippet produces the same list of ports, the correct list for the first ('hard', hardware-connected) JACK server, all four times it does the get_ports() print. The .name print comes out correctly though. Any ideas why this is happening?

print('-----------------------------------------------------------------')
print('Create JACK clients, and use them to verify JACK servers...')
print('-----------------------------------------------------------------')

jack_client_hard = jack.Client('jack_client_hard', servername='default')
jack_client_hard.activate()
jack_client_hard.outports.register('dummy_4hard')

print('JACK ports for hard server:')
print(jack_client_hard.name)
print(jack_client_hard.get_ports())
print('')

jack_client_soft1 = jack.Client('jack_client_soft1', servername='SOFT1')
jack_client_soft1.activate()
jack_client_soft1.outports.register('dummy_4soft1')

print('JACK ports for server SOFT1:')
print(jack_client_soft1.name)
print(jack_client_soft1.get_ports())
print('')

jack_client_soft2 = jack.Client('jack_client_soft2', servername='SOFT2')
jack_client_soft2.activate()
jack_client_soft2.outports.register('dummy_4soft2')

print('JACK ports for server SOFT2:')
print(jack_client_soft2.name)
print(jack_client_soft2.get_ports())
print('')

jack_client_soft3 = jack.Client('jack_client_soft3', servername='SOFT3')
jack_client_soft3.activate()
jack_client_soft3.outports.register('dummy_4soft3')

print('JACK ports for server SOFT3:')
print(jack_client_soft3.name)
print(jack_client_soft3.get_ports())
print('')

input("Press Enter to continue...")

exit(0)
@jebofponderworthy jebofponderworthy changed the title Client objects on multiple servers doesn't work? Client objects on multiple servers don't pull correct port lists? Jan 23, 2018
@mgeier
Copy link
Member

mgeier commented Jan 23, 2018

Thanks for the report!

TBH, I've never used multiple JACK daemons before. I've just tried it and I can reproduce the problem you are reporting.

Sadly, I have no idea what's going wrong here ... do you have any?

@mgeier mgeier added the bug label Jan 23, 2018
@jebofponderworthy
Copy link
Author

Not much at all -- I was honestly hoping you would find something obvious that I had missed in the test code! I might be dimly remembering (or imagining) a two-year-old linux-audio-user conversation in which it was said something like this would occur. If the latter is not an imagination, there's something with the standard JACK primitives which gets in the way of one process attaching itself to multiple JACK processes. For my needs right now, I have worked around it, by creating a new JACK client every time I need to check status. Working workaround is in wait_for_jackport() (not wait_for_jack()) in the below.

https://github.com/jebofponderworthy/the-box-of-no-return/blob/master/jpctrl.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants