comparison libao2/ao_jack.c @ 25650:da94a5973768

Make code slightly less confusing to me
author reimar
date Fri, 11 Jan 2008 20:55:08 +0000
parents 5cf7cb85128f
children d97a607821f1
comparison
equal deleted inserted replaced
25649:5cf7cb85128f 25650:da94a5973768
256 matching_ports = jack_get_ports(client, port_name, NULL, port_flags); 256 matching_ports = jack_get_ports(client, port_name, NULL, port_flags);
257 if (!matching_ports || !matching_ports[0]) { 257 if (!matching_ports || !matching_ports[0]) {
258 mp_msg(MSGT_AO, MSGL_FATAL, "[JACK] no physical ports available\n"); 258 mp_msg(MSGT_AO, MSGL_FATAL, "[JACK] no physical ports available\n");
259 goto err_out; 259 goto err_out;
260 } 260 }
261 num_ports = 1; 261 i = 1;
262 while (matching_ports[num_ports]) num_ports++; 262 while (matching_ports[i]) i++;
263 if (channels > num_ports) channels = num_ports; 263 if (channels > i) channels = i;
264 num_ports = channels; 264 num_ports = channels;
265 265
266 // create out output ports 266 // create out output ports
267 for (i = 0; i < num_ports; i++) { 267 for (i = 0; i < num_ports; i++) {
268 char pname[30]; 268 char pname[30];