summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2016-05-28 07:28:51 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2016-05-28 07:28:51 +0000
commit69fa63f6b7ffc6f27b8dbdadee5fd01acf93b636 (patch)
tree8b7b8cd13588152384f8fe423ecf3483e33c9a6a /usr.bin
parent59596971235614442a43728c1ab62a752151fec8 (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.c2
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;