diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2016-05-28 07:28:51 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2016-05-28 07:28:51 +0000 |
commit | 69fa63f6b7ffc6f27b8dbdadee5fd01acf93b636 (patch) | |
tree | 8b7b8cd13588152384f8fe423ecf3483e33c9a6a /usr.bin | |
parent | 59596971235614442a43728c1ab62a752151fec8 (diff) |
Fix file block size rounding and ensure it's large enough to store a
full audio block.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/aucat/aucat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/aucat/aucat.c b/usr.bin/aucat/aucat.c index 3b1a3638a4b..5ae93d37bf8 100644 --- a/usr.bin/aucat/aucat.c +++ b/usr.bin/aucat/aucat.c @@ -270,7 +270,7 @@ slot_init(struct slot *s) } #endif s->bpf = s->afile.par.bps * (s->cmax - s->cmin + 1); - s->round = (dev_round * s->afile.rate + dev_rate / 2) / dev_rate; + s->round = (dev_round * s->afile.rate + dev_rate - 1) / dev_rate; bufsz = s->round * (dev_bufsz / dev_round); bufsz -= bufsz % s->round; |