diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2011-06-03 17:04:48 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2011-06-03 17:04:48 +0000 |
commit | e723cd489692aa95f2949fcd8a01463ea864bfc9 (patch) | |
tree | dba3a79fb676a510553ad1b5dbf761f37d11a083 /usr.bin | |
parent | b13bfc6a709951c2a394ecb292c2018941927e94 (diff) |
Allow device encoding to be set if -u is also used. Useful to degrade
quality to save bandwith when a remote audio device is used.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/aucat/aucat.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/aucat/aucat.c b/usr.bin/aucat/aucat.c index b3a5fc1e96e..34c74f75ac8 100644 --- a/usr.bin/aucat/aucat.c +++ b/usr.bin/aucat/aucat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aucat.c,v 1.116 2011/06/03 10:05:27 ratchov Exp $ */ +/* $OpenBSD: aucat.c,v 1.117 2011/06/03 17:04:47 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -557,6 +557,8 @@ aucat_main(int argc, char **argv) case 'e': opt_enc(&cs->ipar); aparams_copyenc(&cs->opar, &cs->ipar); + aparams_copyenc(&cd->ipar, &cs->ipar); + aparams_copyenc(&cd->opar, &cd->ipar); break; case 'r': rate = strtonum(optarg, RATE_MIN, RATE_MAX, &str); @@ -678,6 +680,10 @@ aucat_main(int argc, char **argv) */ SLIST_FOREACH(cd, &cfdevs, entry) { mode = 0; + if (!u_flag) { + aparams_init(&cd->opar, NCHAN_MAX - 1, 0, RATE_MIN); + aparams_init(&cd->opar, NCHAN_MAX - 1, 0, RATE_MIN); + } SLIST_FOREACH(cs, &cd->ins, entry) { if (cs->mode == 0) errx(1, "%s: not in play mode", cs->path); |