Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pad Don't overflow when scaling 32bit samples.
details: https://anonhg.NetBSD.org/src/rev/ebc1e6b06253
branches: trunk
changeset: 374544:ebc1e6b06253
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Mon May 01 16:35:47 2023 +0000
description:
Don't overflow when scaling 32bit samples.
diffstat:
sys/dev/pad/pad.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r c82112780c19 -r ebc1e6b06253 sys/dev/pad/pad.c
--- a/sys/dev/pad/pad.c Mon May 01 12:18:08 2023 +0000
+++ b/sys/dev/pad/pad.c Mon May 01 16:35:47 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pad.c,v 1.81 2023/04/23 08:21:11 mlelstv Exp $ */
+/* $NetBSD: pad.c,v 1.82 2023/05/01 16:35:47 mlelstv Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.81 2023/04/23 08:21:11 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.82 2023/05/01 16:35:47 mlelstv Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -756,7 +756,7 @@ pad_swvol_codec(audio_filter_arg_t *arg)
bits = arg->srcfmt->precision;
for (i = 0; i < sample_count; i++) {
- int32_t v;
+ int64_t v;
switch (howmany(bits, NBBY)) {
case 2: /* AUDIO_INTERNAL_BITS == 16 */
Home |
Main Index |
Thread Index |
Old Index