From 3fe3b27ace259af53dd71b6c197ade9acf971b37 Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Fri, 14 Feb 2014 20:59:38 +0100 Subject: [PATCH] return actual rchan, rather requested one --- libsndio/sio_alsa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsndio/sio_alsa.c b/libsndio/sio_alsa.c index 9dbcf7f..2653c8b 100644 --- a/libsndio/sio_alsa.c +++ b/libsndio/sio_alsa.c @@ -752,7 +752,7 @@ sio_alsa_setpar(struct sio_hdl *sh, struct sio_par *par) if (hdl->sio.mode & SIO_REC) { hdl->par.rchan = par->rchan; if (!sio_alsa_setpar_hw(hdl->ipcm, ihwp, - &ifmt, &irate, &par->rchan, + &ifmt, &irate, &hdl->par.rchan, &iround, &iperiods)) { hdl->sio.eof = 1; return 0; @@ -955,7 +955,7 @@ sio_alsa_read(struct sio_hdl *sh, void *buf, size_t len) hdl->ipartial = hdl->ibpf; return 0; } - return n *= hdl->ibpf; + return n * hdl->ibpf; } static size_t