diff options
author | Vincent Labrecque <vincent@cvs.openbsd.org> | 2004-07-10 11:48:31 +0000 |
---|---|---|
committer | Vincent Labrecque <vincent@cvs.openbsd.org> | 2004-07-10 11:48:31 +0000 |
commit | e2b59722d258cb1901ad5ff0ee5952059fdc94ca (patch) | |
tree | dc8c1627e9d1aa4ee84a3e493f42572b82ca57a4 /sys | |
parent | 39f11b8a56090491e62e6bf45577de7cdcc506a7 (diff) |
replace strange cpp magic by straight code
ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/audio.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/dev/audio.c b/sys/dev/audio.c index 494066c3827..c4eba476f86 100644 --- a/sys/dev/audio.c +++ b/sys/dev/audio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: audio.c,v 1.43 2004/01/09 21:32:23 brad Exp $ */ +/* $OpenBSD: audio.c,v 1.44 2004/07/10 11:48:30 vincent Exp $ */ /* $NetBSD: audio.c,v 1.105 1998/09/27 16:43:56 christos Exp $ */ /* @@ -891,24 +891,22 @@ audio_initbufs(sc) } #ifdef AUDIO_INTR_TIME -#define double u_long sc->sc_pnintr = 0; sc->sc_pblktime = (u_long)( - (double)sc->sc_pr.blksize * 100000 / - (double)(sc->sc_pparams.precision / NBBY * + (u_long)sc->sc_pr.blksize * 100000 / + (u_long)(sc->sc_pparams.precision / NBBY * sc->sc_pparams.channels * sc->sc_pparams.sample_rate)) * 10; DPRINTF(("audio: play blktime = %lu for %d\n", sc->sc_pblktime, sc->sc_pr.blksize)); sc->sc_rnintr = 0; sc->sc_rblktime = (u_long)( - (double)sc->sc_rr.blksize * 100000 / - (double)(sc->sc_rparams.precision / NBBY * + (u_long)sc->sc_rr.blksize * 100000 / + (u_long)(sc->sc_rparams.precision / NBBY * sc->sc_rparams.channels * sc->sc_rparams.sample_rate)) * 10; DPRINTF(("audio: record blktime = %lu for %d\n", sc->sc_rblktime, sc->sc_rr.blksize)); -#undef double #endif return 0; |