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
fdca3c2678
commit
b3acce35f8
|
@ -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