mirror of
https://github.com/ericonr/sndio.git
synced 2024-02-18 04:45:21 -06:00
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
b3acce35f8
commit
8744522757
@ -521,17 +521,18 @@ sio_oss_getpar(struct sio_hdl *sh, struct sio_par *par)
|
||||
hdl->sio.eof = 1;
|
||||
return 0;
|
||||
}
|
||||
if (!(hdl->sio.mode & SIO_PLAY)) {
|
||||
par->round = rbi.fragsize / (par->rchan * par->bps);
|
||||
par->bufsz = rbi.fragstotal * par->round;
|
||||
}
|
||||
}
|
||||
par->appbufsz = par->bufsz;
|
||||
#ifdef DEBUG
|
||||
if ((hdl->sio.mode & (SIO_REC | SIO_PLAY)) == (SIO_REC | SIO_PLAY)) {
|
||||
if (pbi.fragstotal != rbi.fragstotal ||
|
||||
pbi.fragsize != rbi.fragsize) {
|
||||
if (pbi.fragsize != rbi.fragsize) {
|
||||
DPRINTF("sio_oss_getpar: frag size/count mismatch\n"
|
||||
"play: size = %d, count = %d\n"
|
||||
"rec: size = %d, count = %d\n",
|
||||
"play: count = %d, size = %d\n"
|
||||
"rec: count = %d, size = %d\n",
|
||||
pbi.fragstotal, pbi.fragsize,
|
||||
rbi.fragstotal, rbi.fragsize);
|
||||
hdl->sio.eof = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user