diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2010-01-12 21:39:40 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2010-01-12 21:39:40 +0000 |
commit | e31f234810925d48ed4c20ffb5163dfc3ae91600 (patch) | |
tree | 770b59ef08c3273bccc277ef06930af801502d8f /usr.bin/aucat | |
parent | c82c7b04a526e1f7decc298ec4cf291832dbb4dd (diff) |
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.
Diffstat (limited to 'usr.bin/aucat')
-rw-r--r-- | usr.bin/aucat/dev.c | 8 |
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; } |