diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2007-07-09 09:18:48 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2007-07-09 09:18:48 +0000 |
commit | 66c6e7bb3db8d0296910a89c81d81a720ea8c1a3 (patch) | |
tree | 126623ee45a52ec7932c1a09670625f0b99f305b /sys/dev/audio.c | |
parent | fb2fdf3618a85d35ca851fb445247e928599d9cf (diff) |
take into account possible expansion and be more careful not to
try to go past the end of the buffer.
this and the last commit allow ffplay and gnash to work properly
on devices that may need to do mono to stereo conversion, like
auich(4).
problem reported by and much debugging deanna@
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 739b32f8256..c811fc2f0d4 100644 --- a/sys/dev/audio.c +++ b/sys/dev/audio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: audio.c,v 1.61 2007/07/09 09:13:04 jakemsr Exp $ */ +/* $OpenBSD: audio.c,v 1.62 2007/07/09 09:18:47 jakemsr Exp $ */ /* $NetBSD: audio.c,v 1.119 1999/11/09 16:50:47 augustss Exp $ */ /* @@ -1812,7 +1812,7 @@ audio_selwakeup(struct audio_softc *sc, int play) #define AUDIO_FILTWRITE(sc) ( \ (!sc->sc_full_duplex && (sc->sc_mode & AUMODE_RECORD)) || \ (!(sc->sc_mode & AUMODE_PLAY_ALL) && sc->sc_playdrop > 0) || \ - (sc->sc_pr.used < sc->sc_pr.usedhigh)) + (sc->sc_pr.used * sc->sc_pparams.factor <= sc->sc_pr.usedlow)) int audio_poll(dev, events, p) |