fix a panic if the requested blocksize was greater than the data rate,

resulting in a divide by 0.
This commit is contained in:
Cameron Grant 2000-12-23 06:09:43 +00:00
parent e246070f8a
commit f4084c4526

View File

@ -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;