diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2010-04-03 17:59:18 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2010-04-03 17:59:18 +0000 |
commit | 535d5e0dba3ec190956fd50c876d8f0d37a44e60 (patch) | |
tree | a90e982674c49f8ccd6a4ba1b54c0ca7ca450896 /usr.bin/aucat/opt.c | |
parent | 1f1e75a96689e478cf3357f495812c131cb352f9 (diff) |
backout last change, committed by mistake, sorry...
Diffstat (limited to 'usr.bin/aucat/opt.c')
-rw-r--r-- | usr.bin/aucat/opt.c | 42 |
1 files changed, 12 insertions, 30 deletions
diff --git a/usr.bin/aucat/opt.c b/usr.bin/aucat/opt.c index c4fd6e6c3c1..2bcaee5a3fc 100644 --- a/usr.bin/aucat/opt.c +++ b/usr.bin/aucat/opt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: opt.c,v 1.5 2010/04/03 17:40:33 ratchov Exp $ */ +/* $OpenBSD: opt.c,v 1.6 2010/04/03 17:59:17 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -27,8 +27,8 @@ struct optlist opt_list = SLIST_HEAD_INITIALIZER(&opt_list); void -opt_new(char *name, struct aparams *wpar, struct aparams *rpar, - int maxweight, int mmc, unsigned mode) +opt_new(char *name, + struct aparams *wpar, struct aparams *rpar, int maxweight, int mmc) { struct opt *o; unsigned len; @@ -54,39 +54,21 @@ opt_new(char *name, struct aparams *wpar, struct aparams *rpar, exit(1); } memcpy(o->name, name, len + 1); - if (mode & MODE_RECMASK) - o->wpar = (mode & MODE_MON) ? *rpar : *wpar; - if (mode & MODE_PLAY) - o->rpar = *rpar; + o->wpar = *wpar; + o->rpar = *rpar; o->maxweight = maxweight; o->mmc = mmc; - o->mode = mode; #ifdef DEBUG if (debug_level >= 2) { dbg_puts(o->name); - dbg_puts(":"); - if (mode & MODE_REC) { - dbg_puts(" rec="); - dbg_putu(o->wpar.cmin); - dbg_puts(":"); - dbg_putu(o->wpar.cmax); - } - if (mode & MODE_PLAY) { - dbg_puts(" play="); - dbg_putu(o->rpar.cmin); - dbg_puts(":"); - dbg_putu(o->rpar.cmax); - dbg_puts(" vol="); - dbg_putu(o->maxweight); - } - if (mode & MODE_MON) { - dbg_puts(" mon="); - dbg_putu(o->wpar.cmin); - dbg_puts(":"); - dbg_putu(o->wpar.cmax); - } + dbg_puts(": rec "); + aparams_dbg(&o->wpar); + dbg_puts(", play "); + aparams_dbg(&o->rpar); + dbg_puts(", vol "); + dbg_putu(o->maxweight); if (o->mmc) - dbg_puts(" mmc"); + dbg_puts(", mmc"); dbg_puts("\n"); } #endif |