diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2007-07-10 08:45:38 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2007-07-10 08:45:38 +0000 |
commit | 67224b1768baf69f53b29f37b470b5d575c42aae (patch) | |
tree | 65f20cca0b018815685a03473eb87785bec692fa /sys/dev/audio.c | |
parent | 5cd13671745a850e2f5b4558a54187d89e7442ae (diff) |
fix the bug rev 1.56 uncovered and rev 1.62 worked around.
data is expanded before it goes in the buffer. all sizes
and offsets used internally are of this expanded data.
there's no need to compensate for this fact except when
showing information to the user in case their actions
depend on how many bytes are in the buffer.
Diffstat (limited to 'sys/dev/audio.c')
-rw-r--r-- | sys/dev/audio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/audio.c b/sys/dev/audio.c index c811fc2f0d4..b2137726230 100644 --- a/sys/dev/audio.c +++ b/sys/dev/audio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: audio.c,v 1.62 2007/07/09 09:18:47 jakemsr Exp $ */ +/* $OpenBSD: audio.c,v 1.63 2007/07/10 08:45:37 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_pparams.factor <= sc->sc_pr.usedlow)) + (sc->sc_pr.used <= sc->sc_pr.usedlow)) int audio_poll(dev, events, p) @@ -2037,7 +2037,7 @@ audio_pint(v) cb->outp += blksize; if (cb->outp >= cb->end) cb->outp = cb->start; - cb->stamp += blksize / sc->sc_pparams.factor; + cb->stamp += blksize; if (cb->mmapped) { DPRINTFN(5, ("audio_pint: mmapped outp=%p cc=%d inp=%p\n", cb->outp, blksize, cb->inp)); |