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:
Alexandre Ratchov 2016-11-05 07:11:08 +01:00
parent 4f56ff6181
commit c25d86c7db
1 changed files with 1 additions and 1 deletions

View File

@ -460,7 +460,7 @@ sio_oss_setpar(struct sio_hdl *sh, struct sio_par *par)
frag_max = round * hdl->chan * formats[i].bps;
frag_shift = 0;
while (1 << (frag_shift + 1) < frag_max)
while (1 << (frag_shift + 1) <= frag_max)
frag_shift++;
frag_count = bufsz / round;