Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev Initialize and set all required parameters for the a...



details:   https://anonhg.NetBSD.org/src/rev/01c60a6aabe5
branches:  trunk
changeset: 824613:01c60a6aabe5
user:      nat <nat%NetBSD.org@localhost>
date:      Sun Jun 11 13:02:44 2017 +0000

description:
Initialize and set all required parameters for the audiobell.

diffstat:

 sys/dev/audiobell.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r efe4b921b69e -r 01c60a6aabe5 sys/dev/audiobell.c
--- a/sys/dev/audiobell.c       Sun Jun 11 12:56:36 2017 +0000
+++ b/sys/dev/audiobell.c       Sun Jun 11 13:02:44 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audiobell.c,v 1.20 2017/06/04 05:37:56 nat Exp $       */
+/*     $NetBSD: audiobell.c,v 1.21 2017/06/11 13:02:44 nat Exp $       */
 
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include <sys/types.h>
-__KERNEL_RCSID(0, "$NetBSD: audiobell.c,v 1.20 2017/06/04 05:37:56 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audiobell.c,v 1.21 2017/06/11 13:02:44 nat Exp $");
 
 #include <sys/audioio.h>
 #include <sys/conf.h>
@@ -123,8 +123,11 @@
                return;
        }
 
+       AUDIO_INITINFO(&ai);
+       ai.mode = AUMODE_PLAY;
        ai.play.sample_rate = BELL_SAMPLE_RATE;
        ai.play.precision = 16;
+       ai.play.channels = 1;
        ai.play.gain = 255 * volume / 100;
 
 #if BYTE_ORDER == LITTLE_ENDIAN



Home | Main Index | Thread Index | Old Index