Set a lower bound on fragment size rather than returning a failure
when the user specifies a maximum fragment size < 2. This is the behavior that Linux provides and fixes the problem I've observed in Tribes2 where sounds effects are delayed by 1/2 a second.
This commit is contained in:
parent
a70925a0c1
commit
eb5358bc43
@ -774,10 +774,8 @@ dsp_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td)
|
||||
|
||||
if (maxfrags == 0)
|
||||
maxfrags = CHN_2NDBUFMAXSIZE / fragsz;
|
||||
if (maxfrags < 2) {
|
||||
ret = EINVAL;
|
||||
break;
|
||||
}
|
||||
if (maxfrags < 2)
|
||||
maxfrags = 2;
|
||||
if (maxfrags * fragsz > CHN_2NDBUFMAXSIZE)
|
||||
maxfrags = CHN_2NDBUFMAXSIZE / fragsz;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user