- made error handling consistent.
command:
% aconnect -i
- client 0: 'System' [group=system] [type=kernel]
- 0 'Timer ' [group=system]
- 1 'Announce ' [group=system]
- client 64: '0: MIDI Synth' [group=] [type=kernel]
- 0 'card 0: synth-midi: 0' [group=device]
+ client 0: 'System' [type=kernel]
+ 0 'Timer '
+ 1 'Announce '
+ client 64: '0: MIDI Synth' [type=kernel]
+ 0 'card 0: synth-midi: 0'
Similary, to see the output ports, use -o flag.
% aconnect -o
- client 64: '0: MIDI Synth' [group=] [type=kernel]
- 0 'card 0: synth-midi: 0' [group=device]
- client 65: 'AWE Wave Table Synth : 0' [group=device] [type=kernel]
- 0 'Emu8000 port 0 ' [group=device]
- 1 'Emu8000 port 1 ' [group=device]
- 2 'Emu8000 port 2 ' [group=device]
- 3 'Emu8000 port 3 ' [group=device]
-
-Some ports may have permission for its own group.
-In such a case, change the group of aconnect to the appropriate one by
-using -g option.
+ client 64: '0: MIDI Synth' [type=kernel]
+ 0 'card 0: synth-midi: 0'
+ client 65: 'AWE Wave Table Synth : 0' [type=kernel]
+ 0 'Emu8000 port 0 '
+ 1 'Emu8000 port 1 '
+ 2 'Emu8000 port 2 '
+ 3 'Emu8000 port 3 '
The option -l together with -i or -o shows subscribers for each port.
.IP "" 4
% aconnect -i
.br
-client 0: 'System' [group=system] [type=kernel]
+client 0: 'System' [type=kernel]
.in +4
-0 'Timer ' [group=system]
+0 'Timer '
.br
-1 'Announce ' [group=system]
+1 'Announce '
.in -4
-client 64: 'External MIDI-0' [group=] [type=kernel]
+client 64: 'External MIDI-0' [type=kernel]
.in +4
-0 'MIDI 0-0 ' [group=device]
+0 'MIDI 0-0 '
.in -4
.PP
Similary, to see the output ports, use
time-stamps are converted to the current value of the given
.I tick
queue.
-.TP
-.B \-g, --group name
-Specify the group name that
-.B aconnect
-uses.
-Some ports may have special permissions, so that only the same group
-may subscribe to them. In such a case,
-.B aconnect
-can fake the group name
-with this option.
.SS LIST PORTS
.TP
{"disconnect", 0, NULL, 'd'},
{"input", 0, NULL, 'i'},
{"output", 0, NULL, 'o'},
- {"group", 1, NULL, 'g'},
{"real", 1, NULL, 'r'},
{"tick", 1, NULL, 't'},
{"exclusive", 0, NULL, 'e'},
snd_seq_port_subscribe_t *subs;
snd_seq_addr_t sender, dest;
- while ((c = getopt_long(argc, argv, "diog:r:t:elx", long_option, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "dior:t:elx", long_option, NULL)) != -1) {
switch (c) {
case 'd':
command = UNSUBSCRIBE;
if (snd_seq_set_client_name(seq, "ALSA Connector") < 0) {
snd_seq_close(seq);
fprintf(stderr, "can't set client info\n");
- return 0;
+ return 1;
}
/* set subscription */
if (snd_seq_parse_address(seq, &sender, argv[optind]) < 0) {
+ snd_seq_close(seq);
fprintf(stderr, "invalid sender address %s\n", argv[optind]);
return 1;
}
if (snd_seq_parse_address(seq, &dest, argv[optind + 1]) < 0) {
+ snd_seq_close(seq);
fprintf(stderr, "invalid destination address %s\n", argv[optind + 1]);
return 1;
}