[Jackaudio] Querying input ports for 1 input channel card fails (ALSA/USB)

Kjetil Matheussen k.s.matheussen at gmail.com
Fri May 8 10:52:18 CEST 2020


On Thu, May 7, 2020 at 10:13 PM Christopher Arndt <chris at chrisarndt.de> wrote:
>
> You should get the output of 'jack_lsp' from the user. Who knows what
> qjackctl is doing between calling 'jack_get_ports' and the patchbay display.
>

Thanks, I've requested that on the forum now.

> Another thing to examine, 'jack_connect' may also return EEXIST, if the
> connection is already made, but your code doesn't distinguish between
> this and other errors. Maybe there's a race condition where some other
> program (qjackctl) has already connected the ports before your code gets
> there?

Good suggestion. I've asked the user to run jackd without qjackctl.
I'm also going to check for EEXIST in the code.


>
> Am 07.05.20 um 10:06 schrieb Kjetil Matheussen:
> > Here's the code:
> > https://github.com/kmatheussen/radium/blob/master/audio/KillJackd.cpp#L128
>
> BTW, while not relevant to your problem
>
>     const char *portname2 = portname1==NULL ? NULL : portnames[1];
>
> portname1 will never be NULL in this block, because it is checked to be
> != NULL in line 135, won't it?
>

Yes. :-) Guess the second block was outside if-block originally, and
when I moved inside I forgot to remove the portname1==NULL test.
Doesn't make any difference though.


More information about the JackAudio mailing list