diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2007-10-27 08:52:48 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2007-10-27 08:52:48 +0000 |
commit | 0d9277f578a4d553bcaa8ea7bef7cba61bdd0b93 (patch) | |
tree | 6f099b536c08b6a664553ff99a1b4c8ea4d1bcd9 /sys | |
parent | bed4d5d4dfbe448e0b3b5c3c1f67fbb7ee1b6f92 (diff) |
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')
-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; |