Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Fix panic when precision < 8.
details: https://anonhg.NetBSD.org/src/rev/816be072c04c
branches: trunk
changeset: 573015:816be072c04c
user: minoura <minoura%NetBSD.org@localhost>
date: Mon Jan 17 14:13:19 2005 +0000
description:
Fix panic when precision < 8.
>From kent@.
diffstat:
sys/dev/audio.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 8d4cbb85c11f -r 816be072c04c sys/dev/audio.c
--- a/sys/dev/audio.c Mon Jan 17 14:06:14 2005 +0000
+++ b/sys/dev/audio.c Mon Jan 17 14:13:19 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.187 2005/01/15 16:23:03 kent Exp $ */
+/* $NetBSD: audio.c,v 1.188 2005/01/17 14:13:19 minoura Exp $ */
/*
* Copyright (c) 1991-1993 Regents of the University of California.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.187 2005/01/15 16:23:03 kent Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.188 2005/01/17 14:13:19 minoura Exp $");
#include "audio.h"
#if NAUDIO > 0
@@ -775,7 +775,7 @@
stream->start = malloc(size, M_DEVBUF, M_WAITOK);
if (stream->start == NULL)
return ENOMEM;
- frame_size = param->precision / 8 * param->channels;
+ frame_size = (param->precision + 7) / 8 * param->channels;
size = (size / frame_size) * frame_size;
stream->end = stream->start + size;
stream->inp = stream->start;
Home |
Main Index |
Thread Index |
Old Index