=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/aucat/aucat.c,v retrieving revision 1.114 retrieving revision 1.115 diff -u -r1.114 -r1.115 --- src/usr.bin/aucat/aucat.c 2011/05/10 06:26:34 1.114 +++ src/usr.bin/aucat/aucat.c 2011/05/26 07:18:40 1.115 @@ -1,4 +1,4 @@ -/* $OpenBSD: aucat.c,v 1.114 2011/05/10 06:26:34 ratchov Exp $ */ +/* $OpenBSD: aucat.c,v 1.115 2011/05/26 07:18:40 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov * @@ -250,6 +250,7 @@ struct aparams ipar; /* input (read) parameters */ struct aparams opar; /* output (write) parameters */ unsigned hold; /* open immediately */ + unsigned autovol; /* adjust volumes */ unsigned bufsz; /* par.bufsz for sio device */ unsigned round; /* par.round for sio device */ unsigned mode; /* bitmap of MODE_XXX */ @@ -442,7 +443,7 @@ "[-o file]\n\t" "[-q device] [-r rate] [-s name] [-t mode] [-U unit] " "[-v volume]\n\t" - "[-x policy] [-z nframes]\n", + "[-w flag] [-x policy] [-z nframes]\n", stderr); } @@ -511,8 +512,9 @@ cd->bufsz = 0; cd->round = 0; cd->hold = 1; + cd->autovol = 1; - while ((c = getopt(argc, argv, "a:dnb:c:C:e:r:h:x:v:i:o:f:m:luq:s:U:L:t:j:z:")) != -1) { + while ((c = getopt(argc, argv, "a:w:dnb:c:C:e:r:h:x:v:i:o:f:m:luq:s:U:L:t:j:z:")) != -1) { switch (c) { case 'd': #ifdef DEBUG @@ -592,6 +594,9 @@ case 'a': cd->hold = opt_onoff(); break; + case 'w': + cd->autovol = opt_onoff(); + break; case 'q': cfmid_add(&cd->mids, optarg); break; @@ -730,7 +735,7 @@ } else { d = dev_new_sio(cd->path, cd->mode | MODE_MIDIMASK, &cd->ipar, &cd->opar, cd->bufsz, cd->round, - cd->hold); + cd->hold, cd->autovol); } if (d == NULL) errx(1, "%s: can't open device", cd->path);