File: drivers.html

package info (click to toggle)
libao 0.8.6-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,144 kB
  • ctags: 468
  • sloc: sh: 8,423; ansic: 3,148; makefile: 295
file content (247 lines) | stat: -rw-r--r-- 6,666 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<html>

<head>
<title>libao - Documentation</title>
<link rel=stylesheet href="style.css" type="text/css">
</head>

<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
<table border=0 width=100%>
<tr>
<td><p class=tiny>libao documentation</p></td>
<td align=right><p class=tiny>libao version 0.8.5 - 20040312</p></td>
</tr>
</table>

<h1>libao Drivers</h1>

<p>
Libao supports both <i>live</i> output drivers and <i>file</i> output
drivers.  Live output drivers send audio data to sound cards and sound
daemons.  File output drivers write audio to disk using a particular
file format (such as WAV, AU, etc.).  You must invoke the
ao_open_????() function that corresponds to the type of driver you are
using, but otherwise live and file drivers are treated identically in
libao.

<h2>Live Output Drivers</h2>

<h3>null</h3>

Null driver.  This is just a test device which does not write the
audio data anywhere.
<p>

<b>Option keys:</b>
<ul>
<li>"debug" - Print the number of bytes written to the device to stderr
when the device is closed.  The option value is ignored.
</ul>
<p>

<hr width="50%">

<h3>alsa</h3>

Advanced Linux Sound Architecture.  This driver borrows some code from
Jaroslav Kysela's &lt;perex@suse.cz&gt; GPLed aplay that is included with
the alsa-util distribution.  It defaults to device 0 on card 0.
Because of the way ALSA reads data, this driver packs sound from
successive calls into a fixed size buffer (defaults to 32kB) and sends
it to the card.  Note that this driver only works with ALSA 0.5.x.
You should use the <tt>alsa09</tt> driver for the ALSA 0.9.x or 1.0.x
series.
<p>

<b>Option keys:</b>
<ul>
<li>"card" - Sound card number.
<li>"dev" - Device number on sound card.
<li>"buf_size" - Override the internal buffer size (in bytes).  
Experiment with this if the sound skips.  Default is 32768.
</ul>
<p>

<hr width="50%">

<h3>alsa09</h3>

Advanced Linux Sound Architecture, version 0.9.x and 1.0.x API.  This 
is essentially the alsa driver modified to use the newer API.
<p>

<b>Option keys:</b>
<ul>
<li>"dev" - Device name of sound card.  Defaults to "default".
<li>"buf_time" - Override the hardward buffer size (in milliseconds).  
<li>"period_time" - Override the size of periods ALSA uses.
<li>"use_mmap" - Set to "1" to enable the use of memory-mapped I/O API.
</ul>
<p>

<hr width="50%">

<h3>esd</h3>

ESounD audio driver.  This sound daemon is used on some Linux systems.
It permits multiple programs to play sound simultaneously and sound to
be sent to networked computers.
<p>

<b>Option keys:</b>
<ul>
<li>"host" - The hostname where esd is running.  By default sound is
played on the local host. A port number can be specified after a
colon, as in "whizbang.com:555".
</ul>
<p>

<hr width="50%">

<h3>irix</h3>

IRIX audio driver.  This was inherited from the original
libao, but has not been tested.  Use at your own risk.  (Better yet,
fix it!  I don't have access to an IRIX system.)
<p>

<b>Option keys:</b> None.
<p>

<hr width="50%">

<h3>oss</h3>

Open Sound System driver.  This is the audio system for
Linux and FreeBSD as well as some other UNIX-like systems.
<p>

<b>Option keys:</b>
<ul>
<li>"dsp" - The dsp device.  By default, the driver tries
"/dev/sound/dsp", followed by "/dev/dsp".
</ul>
<p>

<hr width="50%">

<h3>sun</h3>

Sun audio driver.  This is the audio system for NetBSD, OpenBSD, and
Solaris.
<p>

<b>Option keys:</b>
<ul>
<li>"dev" - The audio device for the sound card.  By default, the
driver tries "/dev/audio".
</ul>
<p>

<hr width="50%">

<h3>aixs</h3>

AIX sound driver.  According to the author, "tested on AIX 5.1 with the Crystal chipsets only (found as internal audio in the 7043-140 and on the MCA adapter DFE5 (7-6)), but it should work with other AIX releases and the ACPA also." 
<p>

<b>Option keys:</b>
<ul>
<li>"dev" - The audio device for the sound card.  By default, the
driver tries "/dev/baud0/1" (device for MCA machines with the Crystal
chipset).  Other possible devices are "/dev/paud0/1" for PCI machines
with the Crystal chipset, and "/dev/acpa0/1" for MCA machines with the
ACPA.
</ul>
<p>

<hr>

<h2>File Output Drivers</h2>

<h3>au</h3>

Sun audio file driver.  Writes a .au file from audio output.  This
driver can write usable data to unseekable files (like standard out),
which the wav driver cannot do.
<p>

<b>Option keys:</b> None.
<p>

<hr width="50%">

<h3>raw</h3>

Raw sample driver.  Writes the sound to disk in uncompressed,
headerless form using the byte order specified.
<p>

<b>Option keys:</b>
<ul>
<li>"byteorder" - Byte order used in the output.  Use "native" for
native machine byte order, "big" for big-endian order, and "little"
for little-endian order.  By default this is "native".
</ul>
<p>

<hr width="50%">

<h3>wav</h3>

Windows sound file output.  Because of the way WAV files are
structured, this driver cannot correct files unless the target file is
seekable.  Writing WAVs to stdout will result in broken files.  Use
either the raw or the au driver instead.
<p>

<b>Option keys:</b> None.
<p>

<hr>

<a name="default_driver">
<h2>Default Driver Detection</h2>

In the absence of <a href="config.html">configuration files</a> to
explicit identify a default driver, the library will try to detect a
suitable default driver.  It does this by testing every available live
output driver (using <a
href="ao_plugin_test.html">ao_plugin_test()</a>) and finding the
driver with the highest priority (see the <a
href="ao_info.html">ao_info</a> struct) that works.  Drivers with
priority 0, such as the null and file output drivers, are never
selected as the default.
<p>

The ranking system currently used is:
<center>
<table border="1">
  <tr><th>Priority</th><th>Drivers</th>              </tr>
  <tr><td>30</td>      <td>alsa, alsa09</td>         </tr>
  <tr><td>20</td>      <td>oss, irix, sun</td>       </tr>
  <tr><td>10</td>      <td>esd,arts</td>             </tr>
  <tr bgcolor="#888888"><td> 0</td>      <td>null, all file output</td></tr>
</table>
</center>
<p>

Clearly, any ranking scheme will fail to make everybody happy.  For
such cases, the <a href="config.html">configuration files</a> can be
easily used to define an appropriate default output device

<br><br>
<hr noshade>
<table border=0 width=100%>
<tr valign=top>
<td><p class=tiny>copyright &copy; 2001-2003 Stan Seibert</p></td>
<td align=right><p class=tiny><a href="http://www.xiph.org/">xiph.org</a><br><a href="mailto:volsung@xiph.org">volsung@xiph.org</a></p></td>
</tr><tr>
<td><p class=tiny>libao documentation</p></td>
<td align=right><p class=tiny>libao version 0.8.5 - 20040312</p></td>
</tr>
</table>

</body>

</html>