summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorratchov <ratchov@openbsd.org>2010-01-12 21:39:39 +0000
committerratchov <ratchov@openbsd.org>2010-01-12 21:39:39 +0000
commit5eb6c9b3f8891920c85372affaf32bf16c43cc83 (patch)
tree920e0e7f82a658bcce1456722149638d55230083
parentFix for a legacy free PC, where the keyboard controller doesn't behave. (diff)
downloadwireguard-openbsd-5eb6c9b3f8891920c85372affaf32bf16c43cc83.tar.xz
wireguard-openbsd-5eb6c9b3f8891920c85372affaf32bf16c43cc83.zip
When attaching a new stream, if the "extra" latency is zero, then
don't trigger a zero-length clock tick. Fixes duplicate start ticks seen by full-duplex clients.
-rw-r--r--usr.bin/aucat/dev.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/aucat/dev.c b/usr.bin/aucat/dev.c
index 87dd6028e59..f22b2c54dbc 100644
--- a/usr.bin/aucat/dev.c
+++ b/usr.bin/aucat/dev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev.c,v 1.40 2010/01/11 13:06:32 ratchov Exp $ */
+/* $OpenBSD: dev.c,v 1.41 2010/01/12 21:39:39 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -631,7 +631,8 @@ dev_attach(char *name,
aproc_setout(conv, ibuf);
}
aproc_setin(dev_mix, ibuf);
- abuf_opos(ibuf, -dev_mix->u.mix.lat);
+ if (dev_mix->u.mix.lat > 0)
+ abuf_opos(ibuf, -dev_mix->u.mix.lat);
ibuf->r.mix.xrun = underrun;
ibuf->r.mix.maxweight = vol;
mix_setmaster(dev_mix);
@@ -669,7 +670,8 @@ dev_attach(char *name,
aproc_setin(conv, obuf);
}
aproc_setout(dev_sub, obuf);
- abuf_ipos(obuf, -dev_sub->u.sub.lat);
+ if (dev_sub->u.sub.lat > 0)
+ abuf_ipos(obuf, -dev_sub->u.sub.lat);
obuf->w.sub.xrun = overrun;
}