mirror of
https://github.com/ericonr/sndio.git
synced 2024-02-18 04:45:21 -06:00
sio_oss.c: if the requrested block size is a power of two
make the oss block size calculation return the requested value.
This commit is contained in:
parent
4f56ff6181
commit
c25d86c7db
@ -460,7 +460,7 @@ sio_oss_setpar(struct sio_hdl *sh, struct sio_par *par)
|
|||||||
|
|
||||||
frag_max = round * hdl->chan * formats[i].bps;
|
frag_max = round * hdl->chan * formats[i].bps;
|
||||||
frag_shift = 0;
|
frag_shift = 0;
|
||||||
while (1 << (frag_shift + 1) < frag_max)
|
while (1 << (frag_shift + 1) <= frag_max)
|
||||||
frag_shift++;
|
frag_shift++;
|
||||||
|
|
||||||
frag_count = bufsz / round;
|
frag_count = bufsz / round;
|
||||||
|
Loading…
Reference in New Issue
Block a user