4 <title>libao - datatype - ao_device
</title>
5 <link rel=stylesheet
href=
"style.css" type=
"text/css">
8 <body bgcolor=white text=black
link=
"#5555ff" alink=
"#5555ff" vlink=
"#5555ff">
9 <table border=
0 width=
100%
>
11 <td><p class=tiny
>libao documentation
</p></td>
12 <td align=right
><p class=tiny
>libao version
0.8.5 -
20040312</p></td>
18 <p><i>declared in
"ao/ao.h";
</i></p>
20 <p>This structure holds all of the data for an open device.
23 <table border=
0 width=
100% color=black cellspacing=
0 cellpadding=
7>
26 <pre><b>typedef struct {
27 int type; /* live output or file output? */
30 FILE *file; /* File for output if this is a file driver */
31 int client_byte_format;
32 int machine_byte_format;
33 int driver_byte_format;
35 int swap_buffer_size; /* Bytes allocated to swap_buffer */
36 void *internal; /* Pointer to driver-specific data */
37 } ao_device;
</b></pre>
42 <h3>Relevant Struct Members
</h3>
45 <dd>The output type of the driver:
47 <li>AO_TYPE_LIVE - Live output.
</li>
48 <li>AO_TYPE_FILE - File output.
</li>
51 <dt><i>driver_id
</i></dt>
52 <dd>The ID number for the driver used with this device.
</dd>
54 <dd>Function table for the driver associated with this device.
</dd>
55 <dt><i>client_byte_format
</i></dt>
56 <dd>The byte format (use constants from
57 <a href=
"ao_sample_format.html">ao_sample_format
</a>) of samples provided by
58 the client to
<a href=
"ao_sample_format.html">ao_play()
</a>.
60 <dt><i>machine_byte_format
</i></dt>
61 <dd>The native byte format of the computer. Will be either
62 <tt>AO_FMT_BIG
</tt> or
<tt>AO_FMT_LITTLE
</tt>.
64 <dt><i>driver_byte_format
</i></dt>
65 <dd>The byte format of samples requested by
68 <dt><i>swap_buffer
</i></dt>
69 <dd>Scratch buffer used to swap the byte order of samples. Only allocated
70 if
<tt>client_byte_format
</tt> and
<tt>driver_byte_format
</tt> correspond to
71 different byte orders, otherwise set to NULL
</dd>
76 <table border=
0 width=
100%
>
78 <td><p class=tiny
>copyright
© 2001-
2003 Stan Seibert
</p></td>
79 <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>
81 <td><p class=tiny
>libao documentation
</p></td>
82 <td align=right
><p class=tiny
>libao version
0.8.5 -
20040312</p></td>