diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2009-11-03 06:41:20 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2009-11-03 06:41:20 +0000 |
commit | a2e01afd078b08a54e7bd68a73d2e3210db6ff5a (patch) | |
tree | 8f79c4a6c3ba90cdfca1ea9d1eccb843bad034cf /lib/libsndio | |
parent | d5cfa73708ba1b25a275f4a89bec02317b750b6a (diff) |
in block size calculations, use SIO_BPS(precision) instead of
precision / 8. Fixes sio_setpar() requesting smaller block sizes
on 24-bit devices.
Diffstat (limited to 'lib/libsndio')
-rw-r--r-- | lib/libsndio/sun.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libsndio/sun.c b/lib/libsndio/sun.c index 76f92c37e62..ccb26c49a92 100644 --- a/lib/libsndio/sun.c +++ b/lib/libsndio/sun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sun.c,v 1.24 2009/10/10 11:27:39 ratchov Exp $ */ +/* $OpenBSD: sun.c,v 1.25 2009/11/03 06:41:19 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -618,9 +618,9 @@ sun_setpar(struct sio_hdl *sh, struct sio_par *par) return 0; } ibpf = (hdl->sio.mode & SIO_REC) ? - aui.record.channels * aui.record.precision / 8 : 1; + aui.record.channels * SIO_BPS(aui.record.precision) : 1; obpf = (hdl->sio.mode & SIO_PLAY) ? - aui.play.channels * aui.play.precision / 8 : 1; + aui.play.channels * SIO_BPS(aui.play.precision) : 1; DPRINTF("sun_setpar: bpf = (%u, %u)\n", ibpf, obpf); |