Ticket #988: jack_allports.diff

File jack_allports.diff, 628 bytes (added by reimar, 18 years ago)

simpler version that should do the same

  • libao2/ao_jack.c

     
    277277    mp_msg(MSGT_AO, MSGL_FATAL, "[JACK] activate failed\n");
    278278    goto err_out;
    279279  }
    280   for (i = 0; i < num_ports; i++) {
    281     if (jack_connect(client, jack_port_name(ports[i]), matching_ports[i])) {
     280  for (i = 0; matching_ports[i]; i++) {
     281    int j = i % num_ports;
     282    if (jack_connect(client, jack_port_name(ports[j]), matching_ports[i])) {
    282283      mp_msg(MSGT_AO, MSGL_FATAL, "[JACK] connecting failed\n");
    283284      goto err_out;
    284285    }