diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2007-10-03 21:49:14 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2007-10-03 21:49:14 +0000 |
commit | 54eeb77f25b00ad84144dbe0edc93b29171edd2f (patch) | |
tree | 6fef7b2dd89ffe730caeb77de1b38b046acb12f7 /share/man | |
parent | 631319f76280aee009fa12421aaf29432592924a (diff) |
add two new audio ioctls, AUDIO_GETPRINFO and AUDIO_GETRRINFO, and the
data structure these ioctls use, audio_bufinfo.
these ioctls return information about the play and record buffers
into the audio_bufinfo structure.
these are being added to aid in porting non-native audio applications
and libraries, and to fix issues in our OSS audio emulation. these
ioctls exist only on OpenBSD and should not be used in code intended
for distribution.
ok ratchov
Diffstat (limited to 'share/man')
-rw-r--r-- | share/man/man4/audio.4 | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/share/man/man4/audio.4 b/share/man/man4/audio.4 index ef24533b841..a261886ba2b 100644 --- a/share/man/man4/audio.4 +++ b/share/man/man4/audio.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: audio.4,v 1.45 2007/09/28 00:52:51 jakemsr Exp $ +.\" $OpenBSD: audio.4,v 1.46 2007/10/03 21:49:12 jakemsr Exp $ .\" $NetBSD: audio.4,v 1.20 1998/05/28 17:27:15 augustss Exp $ .\" .\" Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: September 28 2007 $ +.Dd $Mdocdate: October 3 2007 $ .Dt AUDIO 4 .Os .Sh NAME @@ -298,6 +298,26 @@ typedef struct audio_offset { } audio_offset_t; .Ed .Pp +.It Dv AUDIO_GETRRINFO Fa "audio_bufinto_t *" +.It Dv AUDIO_GETPRINFO Fa "audio_bufinfo_t *" +These commands fetch the current information about the input or +output buffer, respectively. +The block size, high and low water marks and current position +are returned in the +.Vt audio_bufinfo +structure. +.Bd -literal +typedef struct audio_bufinfo { + u_int blksize; /* block size */ + u_int hiwat; /* high water mark */ + u_int lowat; /* low water mark */ + u_int seek; /* current position */ +} audio_bufinfo_t; +.Ed +.Pp +This information is mostly useful in input or output loops to determine +how much data to read or write, respectively. +.Pp .It Dv AUDIO_GETINFO Fa "audio_info_t *" .It Dv AUDIO_SETINFO Fa "audio_info_t *" Get or set audio information as encoded in the |