[LAU] wanted:audio player

Kjetil S. Matheussen k.s.matheussen at notam02.no
Mon Oct 18 12:38:21 UTC 2010

>> used it to play ambisonics files within jack. While it normally does auto-
>> connect to the first hardware-outputs, it can be told to connect to any other
>> jack-client or to none at all...
> The way mplayer selects the ports to connect to is the
> most useless I've ever seen.
> It will connect to the first N ports that match a pattern.
> The order depends on how jack lists them, and that is
> undefined. The chances that you get the 16 channels of
> a 3rd-order file connected correctly are virtually zero.
> Manual connection is an option of course, to be repeated
> for each file (if you play multiple files with the same
> command it will 'reconnect' between them.
> Since the part I'm missing most is playing CDs it looks
> like I'll just add that to my own jack player, or write
> a separate one. Looking at the alsaplayer code it seems
> simple enough.

Perhaps the patch below for mplayer is good enough?

libao2/ao_jack.c :

-  for (i = 0; i < num_ports; i++) {
-    if (jack_connect(client, jack_port_name(ports[i]), matching_ports[i])) {
-      mp_msg(MSGT_AO, MSGL_FATAL, "[JACK] connecting failed\n");
-      goto err_out;
-    }
-  }
+  for (i = 0; i < num_ports; i++) {
+    char portname[1000];
+    sprintf(portname,"%s%d",getenv("MYPORTS"),i);
+    if (jack_connect(client, jack_port_name(ports[i]), portname)) {
+      mp_msg(MSGT_AO, MSGL_FATAL, "[JACK] connecting failed\n");
+      goto err_out;
+    }
+  }

More information about the Linux-audio-user mailing list