From 6c33ab75ef9b85d1b094ef1960018c401a107ffd Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Mon, 3 Jun 2013 16:15:56 +0200 Subject: [PATCH] fix play vs rec parameters confision --- libsndio/sio_alsa.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libsndio/sio_alsa.c b/libsndio/sio_alsa.c index 1da20fd..e4b000b 100644 --- a/libsndio/sio_alsa.c +++ b/libsndio/sio_alsa.c @@ -607,13 +607,15 @@ sio_alsa_setpar(struct sio_hdl *sh, struct sio_par *par) if (!(hdl->sio.mode & SIO_PLAY)) { ofmt = ifmt; orate = irate; - iround = oround; - iperiods = operiods; + oround = iround; + operiods = iperiods; } } DPRINTF("ofmt = %u, orate = %u, oround = %u, operiods = %u\n", ofmt, orate, (unsigned int)oround, operiods); + DPRINTF("ifmt = %u, irate = %u, iround = %u, iperiods = %u\n", + ifmt, irate, (unsigned int)iround, iperiods); if (ifmt != ofmt) { DPRINTF("play and rec formats differ\n");