diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2011-10-12 07:20:05 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2011-10-12 07:20:05 +0000 |
commit | 1000619d5c878b666a9d2ca0f084116e0db82287 (patch) | |
tree | 9780ea7d5f9aa13502408ac23af531e6a4cdc9bf /usr.bin/aucat/midi.c | |
parent | 8cca00d73e143fc10aa31d89c64de9c96fef267e (diff) |
Simplify and improve the way options are parsed and remove ~300 lines
of code that becomes unused. Few command line arguments changes are
required though:
- stream definitions (-ios) now must follow devices definitions they
are attached to (-fMn)
- the -n option is now a special "loopback" device and is thus used
like -f, eg it must precede streams
- in midicat, midi thru boxes are not created automatically anymore,
the new "-M" option must be used for that
- channel numbers (-Cc options) correspond always to channel numbers
of the hardware.
- the -u option isn't needed anymore
- increase the log verbosity so user errors are logged
without using -d
tested by many, help from jmc
Diffstat (limited to 'usr.bin/aucat/midi.c')
-rw-r--r-- | usr.bin/aucat/midi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/aucat/midi.c b/usr.bin/aucat/midi.c index da00d80bfdf..a717a470c42 100644 --- a/usr.bin/aucat/midi.c +++ b/usr.bin/aucat/midi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: midi.c,v 1.36 2011/06/27 07:57:38 ratchov Exp $ */ +/* $OpenBSD: midi.c,v 1.37 2011/10/12 07:20:04 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -784,7 +784,7 @@ ctl_trystart(struct aproc *p, int caller) * allocate a new slot and register the given call-backs */ int -ctl_slotnew(struct aproc *p, char *who, struct ctl_ops *ops, void *arg, int tr) +ctl_slotnew(struct aproc *p, char *who, struct ctl_ops *ops, void *arg, int mmc) { int idx; struct ctl_slot *s; @@ -792,7 +792,7 @@ ctl_slotnew(struct aproc *p, char *who, struct ctl_ops *ops, void *arg, int tr) if (!APROC_OK(p)) { #ifdef DEBUG - if (debug_level >= 1) { + if (debug_level >= 2) { dbg_puts(who); dbg_puts(": MIDI control not available\n"); } @@ -806,7 +806,7 @@ ctl_slotnew(struct aproc *p, char *who, struct ctl_ops *ops, void *arg, int tr) s = p->u.ctl.slot + idx; s->ops = ops; s->arg = arg; - s->tstate = tr ? CTL_STOP : CTL_OFF; + s->tstate = mmc ? CTL_STOP : CTL_OFF; s->ops->vol(s->arg, s->vol); ctl_msg_info(p, idx, msg); ctl_sendmsg(p, NULL, msg, SYSEX_SIZE(mixinfo)); |