summaryrefslogtreecommitdiff
path: root/usr.bin/sndiod
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2013-12-31 12:24:56 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2013-12-31 12:24:56 +0000
commitc3a9d1fa4e6491656a85bf2dff1aa9efd11a0cf4 (patch)
tree459e88fa996b8e57e2297cceabe5cf6cc3b5895a /usr.bin/sndiod
parent696d62954ab2b0b71bfdab2a407e4822606c56ff (diff)
round client block size to nearest possble
Diffstat (limited to 'usr.bin/sndiod')
-rw-r--r--usr.bin/sndiod/sock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/sndiod/sock.c b/usr.bin/sndiod/sock.c
index a552190795a..62c3c96b186 100644
--- a/usr.bin/sndiod/sock.c
+++ b/usr.bin/sndiod/sock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sock.c,v 1.7 2013/11/18 17:37:45 ratchov Exp $ */
+/* $OpenBSD: sock.c,v 1.8 2013/12/31 12:24:55 ratchov Exp $ */
/*
* Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org>
*
@@ -767,7 +767,7 @@ sock_setpar(struct sock *f)
max = 1 + rate / d->round;
min *= s->round;
max *= s->round;
- appbufsz += s->round - 1;
+ appbufsz += s->round / 2;
appbufsz -= appbufsz % s->round;
if (appbufsz < min)
appbufsz = min;