mirror of https://github.com/ericonr/sndio.git
sio_oss.c: In full duplex-mode, don't require play and rec
buffer sizes to be the same. Only the block sizes need to be the same.
This commit is contained in:
parent
8c95537698
commit
9cb5193ca7
|
@ -521,17 +521,18 @@ sio_oss_getpar(struct sio_hdl *sh, struct sio_par *par)
|
||||||
hdl->sio.eof = 1;
|
hdl->sio.eof = 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
par->round = rbi.fragsize / (par->rchan * par->bps);
|
if (!(hdl->sio.mode & SIO_PLAY)) {
|
||||||
par->bufsz = rbi.fragstotal * par->round;
|
par->round = rbi.fragsize / (par->rchan * par->bps);
|
||||||
|
par->bufsz = rbi.fragstotal * par->round;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
par->appbufsz = par->bufsz;
|
par->appbufsz = par->bufsz;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if ((hdl->sio.mode & (SIO_REC | SIO_PLAY)) == (SIO_REC | SIO_PLAY)) {
|
if ((hdl->sio.mode & (SIO_REC | SIO_PLAY)) == (SIO_REC | SIO_PLAY)) {
|
||||||
if (pbi.fragstotal != rbi.fragstotal ||
|
if (pbi.fragsize != rbi.fragsize) {
|
||||||
pbi.fragsize != rbi.fragsize) {
|
|
||||||
DPRINTF("sio_oss_getpar: frag size/count mismatch\n"
|
DPRINTF("sio_oss_getpar: frag size/count mismatch\n"
|
||||||
"play: size = %d, count = %d\n"
|
"play: count = %d, size = %d\n"
|
||||||
"rec: size = %d, count = %d\n",
|
"rec: count = %d, size = %d\n",
|
||||||
pbi.fragstotal, pbi.fragsize,
|
pbi.fragstotal, pbi.fragsize,
|
||||||
rbi.fragstotal, rbi.fragsize);
|
rbi.fragstotal, rbi.fragsize);
|
||||||
hdl->sio.eof = 1;
|
hdl->sio.eof = 1;
|
||||||
|
|
Loading…
Reference in New Issue