xref: /netbsd-src/lib/libossaudio/ossaudio.3 (revision bdc22b2e01993381dcefeff2bc9b56ca75a4235c)
1.\"	$NetBSD: ossaudio.3,v 1.20 2009/03/12 12:33:46 joerg Exp $
2.\"
3.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Lennart Augustsson,
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd February 3, 2009
31.Dt OSSAUDIO 3
32.Os
33.Sh NAME
34.Nm ossaudio
35.Nd OSS audio emulation
36.Sh LIBRARY
37.Lb libossaudio
38.Sh SYNOPSIS
39.In soundcard.h
40.Sh DESCRIPTION
41The
42.Nm
43library provides an emulation of the OSS (Linux) audio
44interface.
45.Pp
46Use the native interface for new programs and the emulation
47library only for porting programs.
48.Ss Mixer Control Map
49The following table summarizes the mappings from native interface
50device names to OSS mixer controls.
51.Pp
52.Bl -column ".Sy Native Device Name" "SOUND_MIXER_SPEAKER"
53.It Sy "Native Device Name" Ta Sy "OSS Mixer Control"
54.It *.mic Ta SOUND_MIXER_MIC
55.It *.line Ta SOUND_MIXER_LINE
56.It *.cd Ta SOUND_MIXER_CD
57.It *.dac Ta SOUND_MIXER_PCM
58.It *.aux Ta SOUND_MIXER_LINE1
59.It *.record Ta SOUND_MIXER_IMIX
60.It *.master Ta SOUND_MIXER_VOLUME
61.It *.treble Ta SOUND_MIXER_TREBLE
62.It *.bass Ta SOUND_MIXER_BASS
63.It *.speaker Ta SOUND_MIXER_SPEAKER
64.It *.output Ta SOUND_MIXER_OGAIN
65.It *.input Ta SOUND_MIXER_IGAIN
66.It *.fmsynth Ta SOUND_MIXER_SYNTH
67.It *.midi Ta SOUND_MIXER_SYNTH
68.El
69.Sh SEE ALSO
70.Xr audio 4 ,
71.Xr midi 4
72.Sh HISTORY
73The
74.Nm
75library first appeared in
76.Nx 1.3 .
77.Sh BUGS
78The emulation uses a #define for
79.Fn ioctl
80so some obscure programs
81can fail to compile.
82.Pp
83The emulation is incomplete.
84.Pp
85The emulation only covers
86.Fn ioctl ,
87there are other differences as well.
88E.g., on a write
89that would block in non-blocking mode Linux returns
90.Dv EINTR
91whereas
92.Nx 1.3
93returns
94.Dv EAGAIN .
95