Fix confusion between ALSA output and input periods count.

This could cause the play start threshold to be larger than the play
buffer in turn causing playback to never start.
This commit is contained in:
Alexandre Ratchov 2020-06-12 22:26:34 +02:00
parent f29a76bc19
commit 0c3fd96693
1 changed files with 3 additions and 3 deletions

View File

@ -821,9 +821,9 @@ sio_alsa_setpar(struct sio_hdl *sh, struct sio_par *par)
return 0;
hdl->par.msb = 1;
hdl->par.bps = SIO_BPS(hdl->par.bits);
hdl->par.rate = irate;
hdl->par.round = iround;
hdl->par.bufsz = iround * iperiods;
hdl->par.rate = orate;
hdl->par.round = oround;
hdl->par.bufsz = oround * operiods;
hdl->par.appbufsz = hdl->par.bufsz;
/* software params */