diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2008-12-17 07:19:28 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2008-12-17 07:19:28 +0000 |
commit | d2fae90c691999fdccc9501bfd8e305dceaa738d (patch) | |
tree | d7b1543f8bb39c9f168a09aa3f5f296728511a18 /regress/lib | |
parent | 30f45188c7e533334067f2c8949db8a87a9c4e2d (diff) |
add a writable ``appbufsz'' field to the sa_par structure, containing
the program-part of the buffer size, ie the part that is subject to
underruns. Useful for apps like cdio(1) that don't have their own
rings, or to apps that have a minimum ring size constraint. Setting
the ``bufsz'' parameter becomes deprecated.
ok jakemsr
Diffstat (limited to 'regress/lib')
-rw-r--r-- | regress/lib/libsndio/fd/fd.c | 2 | ||||
-rw-r--r-- | regress/lib/libsndio/play/play.c | 2 | ||||
-rw-r--r-- | regress/lib/libsndio/rec/rec.c | 1 |
3 files changed, 2 insertions, 3 deletions
diff --git a/regress/lib/libsndio/fd/fd.c b/regress/lib/libsndio/fd/fd.c index 9a76946bc55..d25f32acdc2 100644 --- a/regress/lib/libsndio/fd/fd.c +++ b/regress/lib/libsndio/fd/fd.c @@ -228,7 +228,7 @@ main(int argc, char **argv) { playpath = optarg; break; case 'b': - if (sscanf(optarg, "%u", &par.bufsz) != 1) { + if (sscanf(optarg, "%u", &par.appbufsz) != 1) { fprintf(stderr, "%s: bad buf size\n", optarg); exit(1); } diff --git a/regress/lib/libsndio/play/play.c b/regress/lib/libsndio/play/play.c index a3b28b42ba3..6d85508da42 100644 --- a/regress/lib/libsndio/play/play.c +++ b/regress/lib/libsndio/play/play.c @@ -69,7 +69,7 @@ main(int argc, char **argv) { } break; case 'b': - if (sscanf(optarg, "%u", &par.bufsz) != 1) { + if (sscanf(optarg, "%u", &par.appbufsz) != 1) { fprintf(stderr, "%s: bad buf size\n", optarg); exit(1); } diff --git a/regress/lib/libsndio/rec/rec.c b/regress/lib/libsndio/rec/rec.c index e7d737e8d37..f5c908077dc 100644 --- a/regress/lib/libsndio/rec/rec.c +++ b/regress/lib/libsndio/rec/rec.c @@ -44,7 +44,6 @@ main(int argc, char **argv) { par.bits = 16; par.rchan = 2; par.rate = 44100; - par.bufsz = 0x10000; while ((ch = getopt(argc, argv, "r:c:e:b:x:")) != -1) { switch(ch) { |