fix a panic if the requested blocksize was greater than the data rate,
resulting in a divide by 0.
This commit is contained in:
parent
e246070f8a
commit
f4084c4526
@ -1247,6 +1247,8 @@ chn_setblocksize(pcm_channel *c, int blkcnt, int blksz)
|
||||
|
||||
/* adjust for different hw format/speed */
|
||||
irqhz = (bs->bps * bs->spd) / bs->blksz;
|
||||
if (irqhz < 16)
|
||||
irqhz = 16;
|
||||
|
||||
b->blksz = (b->bps * b->spd) / irqhz;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user