From 69fa63f6b7ffc6f27b8dbdadee5fd01acf93b636 Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Sat, 28 May 2016 07:28:51 +0000 Subject: Fix file block size rounding and ensure it's large enough to store a full audio block. --- usr.bin/aucat/aucat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.bin') 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; -- cgit v1.2.3