Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/man/man4 Update the speaker man page, mentioning wsbel...
details: https://anonhg.NetBSD.org/src/rev/921890485879
branches: trunk
changeset: 354348:921890485879
user: nat <nat%NetBSD.org@localhost>
date: Tue Jun 13 06:25:20 2017 +0000
description:
Update the speaker man page, mentioning wsbell and new formatting for
ioctls.
Ok pgoyette@.
diffstat:
share/man/man4/speaker.4 | 45 +++++++++++++++++++++++++++++----------------
1 files changed, 29 insertions(+), 16 deletions(-)
diffs (83 lines):
diff -r b0207c5eae84 -r 921890485879 share/man/man4/speaker.4
--- a/share/man/man4/speaker.4 Tue Jun 13 05:49:48 2017 +0000
+++ b/share/man/man4/speaker.4 Tue Jun 13 06:25:20 2017 +0000
@@ -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 <nathanialsloss%yahoo.com.au@localhost>
.\" 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 @@
.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 @@
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 @@
.It Pa /dev/speaker
.El
.Sh SEE ALSO
+.Xr audio 4 ,
.Xr pcppi 4 ,
+.Xr wsbell 4 ,
.Xr sysctl 8
.Sh HISTORY
This
Home |
Main Index |
Thread Index |
Old Index