jack_connect with many channels
<tom <at> trellis.ch>
2014-10-19 18:17:41 GMT
i use the following code snippet to connect all available hardware/system
capture ports to a client:
if(!jack_connect (client, ports[i],jack_port_name(ioPortArray[j])))
fprintf (stderr, "autoconnect: %s -> %s\n",
fprintf (stderr, "autoconnect: failed: %s -> %s\n",
fprintf (stderr, "\n");
When there are only few system:capture ports and the client has many input
ports it fails with a segmentation fault, jack log shows
subgraph starting at send timed out (subgraph_wait_fd=8, status = 0, state
= Triggered, pollret = 0 revents = 0x0)
Since connections can only be made after the client was activated, the
first thought was that it simply takes too long (this is done outside the
Maybe the client code is buggy. When the client in question is run in gdb,
this is the output:
[New Thread 0x7ffff7fa0700 (LWP 6321)]
autoconnect: system:capture_1 -> send:input_1
autoconnect: system:capture_2 -> send:input_2
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff73278f3 in _IO_vfprintf_internal (s=s <at> entry=0x7fffffffc840,
format=<optimized out>, format <at> entry=0x7ffff7bccdbc "%s",
ap=ap <at> entry=0x7fffffffc9a8) at vfprintf.c:1661
1661 vfprintf.c: No such file or directory.
Search on the internet didn't reveal anything other than this might be
related to vprintf / datatypes / output things.
Some further observations:
-This happens only with a large number of involved client input ports
-This happens only for a connection direction of hw->client. client->hw
hasn't that issue.
-This happens only with jack1 !
So i wondered possible differences that could make it work / not work or
how the code could be adapted to work with both jacks.
Any help is appreciated,