Module Name:    src
Committed By:   nat
Date:           Sun Jun  4 05:37:56 UTC 2017

Modified Files:
        src/sys/dev: audiobell.c

Log Message:
Fix volume botch.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/audiobell.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/audiobell.c
diff -u src/sys/dev/audiobell.c:1.19 src/sys/dev/audiobell.c:1.20
--- src/sys/dev/audiobell.c:1.19	Sun May 28 21:15:58 2017
+++ src/sys/dev/audiobell.c	Sun Jun  4 05:37:56 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: audiobell.c,v 1.19 2017/05/28 21:15:58 nat Exp $	*/
+/*	$NetBSD: audiobell.c,v 1.20 2017/06/04 05:37:56 nat Exp $	*/
 
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include <sys/types.h>
-__KERNEL_RCSID(0, "$NetBSD: audiobell.c,v 1.19 2017/05/28 21:15:58 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audiobell.c,v 1.20 2017/06/04 05:37:56 nat Exp $");
 
 #include <sys/audioio.h>
 #include <sys/conf.h>
@@ -125,7 +125,7 @@ audiobell(void *v, u_int pitch, u_int pe
 
 	ai.play.sample_rate = BELL_SAMPLE_RATE;
 	ai.play.precision = 16;
-	ai.play.gain = 255 * 100 / volume;
+	ai.play.gain = 255 * volume / 100;
 
 #if BYTE_ORDER == LITTLE_ENDIAN
 	ai.play.encoding = AUDIO_ENCODING_SLINEAR_LE;

Reply via email to