Module Name:    src
Committed By:   nat
Date:           Tue Jun 13 06:25:20 UTC 2017

Modified Files:
        src/share/man/man4: speaker.4

Log Message:
Update the speaker man page, mentioning wsbell and new formatting for
ioctls.

Ok pgoyette@.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/share/man/man4/speaker.4

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

Modified files:

Index: src/share/man/man4/speaker.4
diff -u src/share/man/man4/speaker.4:1.22 src/share/man/man4/speaker.4:1.23
--- src/share/man/man4/speaker.4:1.22	Sun Jun 11 10:30:15 2017
+++ src/share/man/man4/speaker.4	Tue Jun 13 06:25:20 2017
@@ -1,4 +1,4 @@
-.\" $NetBSD: speaker.4,v 1.22 2017/06/11 10:30:15 pgoyette Exp $
+.\" $NetBSD: speaker.4,v 1.23 2017/06/13 06:25:20 nat Exp $
 .\"
 .\" Copyright (c) 2016 Nathanial Sloss <nathanialsl...@yahoo.com.au>
 .\" All rights reserved.
@@ -35,7 +35,7 @@
 .\"
 .\" <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
 .\"
-.Dd June 11, 2017
+.Dd June 13, 2017
 .Dt SPEAKER 4
 .Os
 .Sh NAME
@@ -77,10 +77,9 @@ Other processes may emit beeps while the
 .Pp
 For the audio device speaker, the speaker uses one of the virtual audio
 channels.
-Enabling this device will also provide a keyboard bell.
-The audio device used for synthesized beeps can be controlled by the
-.Sq hw.beep.device
-sysctl variable.
+Enabling this device will also provide a
+.Xr wsbell 4
+keyboard bell.
 .Pp
 Applications may call
 .Fn ioctl
@@ -88,18 +87,30 @@ on a speaker file descriptor to control 
 definitions for the
 .Fn ioctl
 interface are in
-.In machine/spkr.h .
-The tone_t structure used in these calls has two fields,
-specifying a frequency (in hz) and a duration (in 1/100ths of a second).
+.In dev/spkrio.h .
+.Pp
+The tone_t structure is as follows:
+.Bd -literal
+typedef struct {
+	int	frequency;	/* in hertz */
+	int	duration;	/* in 1/100ths of a second */
+} tone_t;
+.Ed
 A frequency of zero is interpreted as a rest.
 .Pp
-At present there are two such ioctls.
-SPKRTONE accepts a pointer to a
-single tone structure as third argument and plays it.
-SPKRTUNE accepts a
-pointer to the first of an array of tone structures and plays them in
-continuous sequence; this array must be terminated by a final member with
-a zero duration.
+At present there are four ioctls:
+.Bl -tag -width Dv
+.It Dv SPKRGETVOL
+Returns an integer, which is the current bell volume as a percentage (0-100).
+.It Dv SPKRSETVOL
+Accepts an integer, which is the desired volume as a percentage.
+.It Dv SPKRTONE
+Accepts a pointer to a single tone structure as third argument and plays it.
+.It Dv SPKRTUNE
+Accepts a pointer to the first of an array of tone structures and plays
+them in continuous sequence; this array must be terminated by a final member
+with a zero duration.
+.El
 .Pp
 The play-string language is modelled on the PLAY statement conventions of
 IBM BASIC 2.0.
@@ -197,7 +208,9 @@ melody sections.
 .It Pa /dev/speaker
 .El
 .Sh SEE ALSO
+.Xr audio 4 ,
 .Xr pcppi 4 ,
+.Xr wsbell 4 ,
 .Xr sysctl 8
 .Sh HISTORY
 This

Reply via email to