sad

simple audio daemon
git clone git://git.2f30.org/sad.git
Log | Files | Refs | LICENSE

commit 96d687447e8ae360bb30681b72d260c73561e1f3
parent c705b8624aaff3593851321d70852d300d52c437
Author: sin <sin@2f30.org>
Date:   Thu Dec 25 13:43:51 +0000

Ensure params have been accepted

Diffstat:
sndio.c | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/sndio.c b/sndio.c @@ -40,6 +40,15 @@ sndioopen(int bits, int rate, int channels) return -1; } + if (par.bits != bits || par.rate != rate || + par.pchan != channels || par.le != SIO_LE_NATIVE || + par.sig != 1) { + warnx("unsupported audio params"); + sio_close(hdl); + hdl = NULL; + return -1; + } + if (!sio_start(hdl)) { warnx("sio_start: failed"); sio_close(hdl);