diff options
author | 2007-10-27 08:52:47 +0000 | |
---|---|---|
committer | 2007-10-27 08:52:47 +0000 | |
commit | d65774a607166812f4a63e050677b08bf14ba106 (patch) | |
tree | 1b421f894cd6434080f0b77b952b980f45a7015d /sys/dev/audio.c | |
parent | fix indentation (diff) | |
download | wireguard-openbsd-d65774a607166812f4a63e050677b08bf14ba106.tar.xz wireguard-openbsd-d65774a607166812f4a63e050677b08bf14ba106.zip |
fix: when a block is captured audio_rint() is called, we must
consider that the ring buffer has overrrun if (used >= usedhigh) and not
if (used >= usedhigh + blksize), otherwise recording doesn't work when
large enough blocks are used
ok jakemsr@
Diffstat (limited to 'sys/dev/audio.c')
-rw-r--r-- | sys/dev/audio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/audio.c b/sys/dev/audio.c index 6a2ec8d4dfe..fa5819223e0 100644 --- a/sys/dev/audio.c +++ b/sys/dev/audio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: audio.c,v 1.85 2007/10/25 18:13:42 ratchov Exp $ */ +/* $OpenBSD: audio.c,v 1.86 2007/10/27 08:52:47 ratchov Exp $ */ /* $NetBSD: audio.c,v 1.119 1999/11/09 16:50:47 augustss Exp $ */ /* @@ -2169,7 +2169,7 @@ audio_rint(void *v) cb->pdrops += blksize; cb->outp += blksize; cb->used -= blksize; - } else if (cb->used + blksize >= cb->usedhigh && !cb->copying) { + } else if (cb->used >= cb->usedhigh && !cb->copying) { DPRINTFN(1, ("audio_rint: drops %lu\n", cb->drops)); cb->drops += blksize; cb->outp += blksize; |