provide floor for sampling rate; from khym@bga.com; netbsd pr#1770
authorderaadt <deraadt@openbsd.org>
Mon, 20 Nov 1995 09:36:56 +0000 (09:36 +0000)
committerderaadt <deraadt@openbsd.org>
Mon, 20 Nov 1995 09:36:56 +0000 (09:36 +0000)
sys/dev/audio.c

index 5fa7e0f..1ba137d 100644 (file)
@@ -819,6 +819,8 @@ audio_calc_blksize(sc)
                bs = AU_RING_SIZE;
 
        bs &= ~1;               /* make it even, in case of stereo  */
+       if (bs == 0)
+               bs = 2;
        return(bs);
 }