mirror of https://github.com/ericonr/sndio.git
sio_oss.c: Disallow tiny fragment sizes, as they may overload
the system. And as sndiod runs with increased priority, it would consume all the cpu and could in turn hang the system.
This commit is contained in:
parent
c25d86c7db
commit
8c95537698
|
@ -459,7 +459,7 @@ sio_oss_setpar(struct sio_hdl *sh, struct sio_par *par)
|
|||
}
|
||||
|
||||
frag_max = round * hdl->chan * formats[i].bps;
|
||||
frag_shift = 0;
|
||||
frag_shift = 8;
|
||||
while (1 << (frag_shift + 1) <= frag_max)
|
||||
frag_shift++;
|
||||
|
||||
|
|
Loading…
Reference in New Issue