comparison html/add-new-device.html @ 33:3caceef436ea tip

formatting for web
author Robert McIntyre <rlm@mit.edu>
date Sat, 11 Feb 2012 12:25:55 -0700
parents f9476ff7637e
children
comparison
equal deleted inserted replaced
32:b8bc24918d63 33:3caceef436ea
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" 4 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5 lang="en" xml:lang="en">
6 <head> 5 <head>
7 <title>all the steps to add a device to open-al</title> 6 <title>Steps to add a new Device to Open-AL</title>
8 <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> 7 <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
8 <meta name="title" content="Steps to add a new Device to Open-AL"/>
9 <meta name="generator" content="Org-mode"/> 9 <meta name="generator" content="Org-mode"/>
10 <meta name="generated" content="2011-10-20 15:48:47 MST"/> 10 <meta name="generated" content="2012-02-11 04:43:24 MST"/>
11 <meta name="author" content="Robert McIntyre"/> 11 <meta name="author" content="Robert McIntyre"/>
12 <meta name="description" content="how to add a new device to open-al"/> 12 <meta name="description" content="how to add a new device to open-al"/>
13 <meta name="keywords" content=""/> 13 <meta name="keywords" content=""/>
14 <style type="text/css"> 14 <style type="text/css">
15 <!--/*--><![CDATA[/*><!--*/ 15 <!--/*--><![CDATA[/*><!--*/
42 td.left { text-align:left; } 42 td.left { text-align:left; }
43 td.center { text-align:center; } 43 td.center { text-align:center; }
44 dt { font-weight: bold; } 44 dt { font-weight: bold; }
45 div.figure { padding: 0.5em; } 45 div.figure { padding: 0.5em; }
46 div.figure p { text-align: center; } 46 div.figure p { text-align: center; }
47 div.inlinetask {
48 padding:10px;
49 border:2px solid gray;
50 margin:10px;
51 background: #ffffcc;
52 }
47 textarea { overflow-x: auto; } 53 textarea { overflow-x: auto; }
48 .linenr { font-size:smaller } 54 .linenr { font-size:smaller }
49 .code-highlighted {background-color:#ffff00;} 55 .code-highlighted {background-color:#ffff00;}
50 .org-info-js_info-navigation { border-style:none; } 56 .org-info-js_info-navigation { border-style:none; }
51 #org-info-js_console-label { font-size:10px; font-weight:bold; 57 #org-info-js_console-label { font-size:10px; font-weight:bold;
79 </script> 85 </script>
80 86
81 </head> 87 </head>
82 <body> 88 <body>
83 89
90
84 <div id="content"> 91 <div id="content">
85 92 <h1 class="title">Steps to add a new Device to Open-AL</h1>
86 93
87 94
88 <div class="header"> 95 <div class="header">
89 <div class="float-right"> 96 <div class="float-right">
90 <!-- 97 <!--
99 <li><a href="/">read the blog &raquo;</a></li> 106 <li><a href="/">read the blog &raquo;</a></li>
100 <!-- li><a href="#">learn about us &raquo;</a></li--> 107 <!-- li><a href="#">learn about us &raquo;</a></li-->
101 </ul> 108 </ul>
102 </div> 109 </div>
103 110
104 <h1 class="title">all the steps to add a device to open-al</h1>
105 <div class="author">Written by <author>Robert McIntyre</author></div> 111 <div class="author">Written by <author>Robert McIntyre</author></div>
106 112
107 113
108 114
109 115
112 118
113 <div id="table-of-contents"> 119 <div id="table-of-contents">
114 <h2>Table of Contents</h2> 120 <h2>Table of Contents</h2>
115 <div id="text-table-of-contents"> 121 <div id="text-table-of-contents">
116 <ul> 122 <ul>
117 <li><a href="#sec-1">1 How to add a new backend device </a></li> 123 <li><a href="#sec-1">1 In Alc/backends/&lt;your-device&gt;.c</a></li>
118 <li><a href="#sec-2">2 In Alc/backends/&lt;your-device&gt;.c </a></li> 124 <li><a href="#sec-2">2 In OpenAL32/Include/alMain.h :</a></li>
119 <li><a href="#sec-3">3 In OpenAL32/Include/alMain.h : </a></li> 125 <li><a href="#sec-3">3 In Alc/ALc.c :</a></li>
120 <li><a href="#sec-4">4 In Alc/ALc.c : </a></li> 126 <li><a href="#sec-4">4 In CMakeLists.txt</a></li>
121 <li><a href="#sec-5">5 In CMakeLists.txt </a></li> 127 <li><a href="#sec-5">5 In ~/.alsoftrc</a></li>
122 <li><a href="#sec-6">6 In ~/.alsoftrc </a></li>
123 </ul> 128 </ul>
124 </div> 129 </div>
125 </div> 130 </div>
126 131
127 <div id="outline-container-1" class="outline-2"> 132 <div id="outline-container-1" class="outline-2">
128 <h2 id="sec-1"><span class="section-number-2">1</span> How to add a new backend device </h2> 133 <h2 id="sec-1"><span class="section-number-2">1</span> In Alc/backends/&lt;your-device&gt;.c</h2>
129 <div class="outline-text-2" id="text-1"> 134 <div class="outline-text-2" id="text-1">
130
131
132 </div>
133
134 </div>
135
136 <div id="outline-container-2" class="outline-2">
137 <h2 id="sec-2"><span class="section-number-2">2</span> In Alc/backends/&lt;your-device&gt;.c </h2>
138 <div class="outline-text-2" id="text-2">
139 135
140 136
141 137
142 138
143 139
144 <pre class="src src-C"><span style="color: #f0dfaf; font-weight: bold;">static</span> <span style="color: #f0dfaf; font-weight: bold;">const</span> <span style="color: #dfdfbf; font-weight: bold;">ALCchar</span> &lt;your-device&gt;_device[] = &lt;your-device-name&gt;; 140 <pre class="src src-C"><span style="color: #f0dfaf; font-weight: bold;">static</span> <span style="color: #f0dfaf; font-weight: bold;">const</span> <span style="color: #dfdfbf; font-weight: bold;">ALCchar</span> &lt;your-device&gt;_device[] = &lt;your-device-name&gt;;
145 141
146 <span style="color: #dfdfbf; font-weight: bold;">ALCboolean</span> <span style="color: #f0dfaf;">alc_</span>&lt;your-device&gt;_init(BackendFuncs *func_list) 142 <span style="color: #dfdfbf; font-weight: bold;">ALCboolean</span> <span style="color: #f0dfaf;">alc_</span>&lt;your-device&gt;_init(BackendFuncs *func_list)
147 <span style="color: #dfdfbf; font-weight: bold;">void</span> <span style="color: #f0dfaf;">alc_</span>&lt;your-device&gt;_deinit(<span style="color: #dfdfbf; font-weight: bold;">void</span>) 143 <span style="color: #dfdfbf; font-weight: bold;">void</span> <span style="color: #f0dfaf;">alc_</span>&lt;your-device&gt;_deinit(<span style="color: #dfdfbf; font-weight: bold;">void</span>)
148 144
149 <span style="color: #f0dfaf; font-weight: bold;">static</span> <span style="color: #dfdfbf; font-weight: bold;">ALCboolean</span> &lt;your-device&gt;_open_playback(ALCdevice *device, <span style="color: #f0dfaf; font-weight: bold;">const</span> <span style="color: #dfdfbf; font-weight: bold;">ALCchar</span> *<span style="color: #f0dfaf;">deviceName</span>) 145 <span style="color: #f0dfaf; font-weight: bold;">static</span> <span style="color: #dfdfbf; font-weight: bold;">ALCboolean</span> &lt;your-device&gt;_open_playback
146 (ALCdevice *device,<span style="color: #f0dfaf; font-weight: bold;">const</span> <span style="color: #dfdfbf; font-weight: bold;">ALCchar</span> *<span style="color: #f0dfaf;">deviceName</span>)
150 <span style="color: #f0dfaf; font-weight: bold;">static</span> <span style="color: #dfdfbf; font-weight: bold;">void</span> &lt;your-device&gt;_close_playback(ALCdevice *device) 147 <span style="color: #f0dfaf; font-weight: bold;">static</span> <span style="color: #dfdfbf; font-weight: bold;">void</span> &lt;your-device&gt;_close_playback(ALCdevice *device)
151 <span style="color: #f0dfaf; font-weight: bold;">static</span> <span style="color: #dfdfbf; font-weight: bold;">ALCboolean</span> &lt;your-device&gt;_reset_playback(ALCdevice *device) 148 <span style="color: #f0dfaf; font-weight: bold;">static</span> <span style="color: #dfdfbf; font-weight: bold;">ALCboolean</span> &lt;your-device&gt;_reset_playback(ALCdevice *device)
152 <span style="color: #f0dfaf; font-weight: bold;">static</span> <span style="color: #dfdfbf; font-weight: bold;">void</span> &lt;your-device&gt;_stop_playback(ALCdevice *device) 149 <span style="color: #f0dfaf; font-weight: bold;">static</span> <span style="color: #dfdfbf; font-weight: bold;">void</span> &lt;your-device&gt;_stop_playback(ALCdevice *device)
153 </pre> 150
154 151 </pre>
155
156 152
157 153
158 154
159 <pre class="src src-C"><span style="color: #dfdfbf; font-weight: bold;">void</span> <span style="color: #f0dfaf;">alc_</span>&lt;your-device&gt;_probe(<span style="color: #f0dfaf; font-weight: bold;">enum</span> <span style="color: #dfdfbf; font-weight: bold;">DevProbe</span> <span style="color: #f0dfaf;">type</span>) 155 <pre class="src src-C"><span style="color: #dfdfbf; font-weight: bold;">void</span> <span style="color: #f0dfaf;">alc_</span>&lt;your-device&gt;_probe(<span style="color: #f0dfaf; font-weight: bold;">enum</span> <span style="color: #dfdfbf; font-weight: bold;">DevProbe</span> <span style="color: #f0dfaf;">type</span>)
160 { 156 {
172 } 168 }
173 </pre> 169 </pre>
174 170
175 171
176 172
177
178
179 <pre class="src src-C"><span style="color: #f0dfaf; font-weight: bold;">static</span> <span style="color: #f0dfaf; font-weight: bold;">const</span> <span style="color: #dfdfbf; font-weight: bold;">BackendFuncs</span> &lt;your-device&gt;_funcs = { 173 <pre class="src src-C"><span style="color: #f0dfaf; font-weight: bold;">static</span> <span style="color: #f0dfaf; font-weight: bold;">const</span> <span style="color: #dfdfbf; font-weight: bold;">BackendFuncs</span> &lt;your-device&gt;_funcs = {
180 &lt;your-device&gt;_open_playback, 174 &lt;your-device&gt;_open_playback,
181 &lt;your-device&gt;_close_playback, 175 &lt;your-device&gt;_close_playback,
182 &lt;your-device&gt;_reset_playback, 176 &lt;your-device&gt;_reset_playback,
183 &lt;your-device&gt;_stop_playback, 177 &lt;your-device&gt;_stop_playback,
190 }; 184 };
191 </pre> 185 </pre>
192 186
193 187
194 188
195 189 </div>
196 190
197 </div> 191 </div>
198 192
199 </div> 193 <div id="outline-container-2" class="outline-2">
200 194 <h2 id="sec-2"><span class="section-number-2">2</span> In OpenAL32/Include/alMain.h :</h2>
201 <div id="outline-container-3" class="outline-2"> 195 <div class="outline-text-2" id="text-2">
202 <h2 id="sec-3"><span class="section-number-2">3</span> In OpenAL32/Include/alMain.h : </h2>
203 <div class="outline-text-2" id="text-3">
204 196
205 197
206 198
207 199
208 200
211 <span style="color: #dfdfbf; font-weight: bold;">void</span> <span style="color: #f0dfaf;">alc_</span>&lt;your-device&gt;_probe(<span style="color: #f0dfaf; font-weight: bold;">enum</span> <span style="color: #dfdfbf; font-weight: bold;">DevProbe</span> <span style="color: #f0dfaf;">type</span>); 203 <span style="color: #dfdfbf; font-weight: bold;">void</span> <span style="color: #f0dfaf;">alc_</span>&lt;your-device&gt;_probe(<span style="color: #f0dfaf; font-weight: bold;">enum</span> <span style="color: #dfdfbf; font-weight: bold;">DevProbe</span> <span style="color: #f0dfaf;">type</span>);
212 204
213 </pre> 205 </pre>
214 206
215 207
216 208 </div>
217 209
218 </div> 210 </div>
219 211
220 </div> 212 <div id="outline-container-3" class="outline-2">
221 213 <h2 id="sec-3"><span class="section-number-2">3</span> In Alc/ALc.c :</h2>
222 <div id="outline-container-4" class="outline-2"> 214 <div class="outline-text-2" id="text-3">
223 <h2 id="sec-4"><span class="section-number-2">4</span> In Alc/ALc.c : </h2>
224 <div class="outline-text-2" id="text-4">
225 215
226 216
227 217
228 218
229 <pre class="src src-C"> { <span style="color: #cc9393;">"&lt;your-device&gt;"</span>, alc_&lt;your-device&gt;_init, 219 <pre class="src src-C"> { <span style="color: #cc9393;">"&lt;your-device&gt;"</span>, alc_&lt;your-device&gt;_init,
230 alc_&lt;your-device&gt;_deinit, alc_&lt;your-device&gt;_probe, EmptyFuncs }, 220 alc_&lt;your-device&gt;_deinit, alc_&lt;your-device&gt;_probe, EmptyFuncs },
231 221
232 </pre> 222 </pre>
233 223
234 224
235 225 </div>
236 226
237 </div> 227 </div>
238 228
239 </div> 229 <div id="outline-container-4" class="outline-2">
240 230 <h2 id="sec-4"><span class="section-number-2">4</span> In CMakeLists.txt</h2>
241 <div id="outline-container-5" class="outline-2"> 231 <div class="outline-text-2" id="text-4">
242 <h2 id="sec-5"><span class="section-number-2">5</span> In CMakeLists.txt </h2>
243 <div class="outline-text-2" id="text-5">
244 232
245 233
246 234
247 235
248 <pre class="src src-cmake">SET(ALC_OBJS Alc/ALc.c 236 <pre class="src src-cmake">SET(ALC_OBJS Alc/ALc.c
260 Alc/mixer.c 248 Alc/mixer.c
261 Alc/panning.c 249 Alc/panning.c
262 # Default backends, always available 250 # Default backends, always available
263 Alc/backends/loopback.c 251 Alc/backends/loopback.c
264 Alc/backends/null.c 252 Alc/backends/null.c
265 # : add &lt;your-device&gt; device 253 # : add &lt;your-device&gt; herex
266 Alc/backends/&lt;your-device&gt;.c 254 Alc/backends/&lt;your-device&gt;.c
267 ) 255 )
268 </pre> 256 </pre>
269 257
270 258
271 259
272 260 </div>
273 261
274 </div> 262 </div>
275 263
276 </div> 264 <div id="outline-container-5" class="outline-2">
277 265 <h2 id="sec-5"><span class="section-number-2">5</span> In ~/.alsoftrc</h2>
278 <div id="outline-container-6" class="outline-2"> 266 <div class="outline-text-2" id="text-5">
279 <h2 id="sec-6"><span class="section-number-2">6</span> In ~/.alsoftrc </h2>
280 <div class="outline-text-2" id="text-6">
281 267
282 268
283 269
284 270
285 271
286 <pre class="src src-conf"><span style="color: #f0dfaf;">drivers</span> = &lt;your-device&gt; 272 <pre class="src src-conf"><span style="color: #f0dfaf;">drivers</span> = &lt;your-device&gt;
287 </pre> 273 </pre>
288 274
289 275 </div>
290 276 </div>
291 </div> 277 </div>
292 </div> 278
293 <div id="postamble"> 279 <div id="postamble">
294 <p class="date">Date: 2011-10-20 15:48:47 MST</p> 280 <p class="date">Date: 2012-02-11 04:43:24 MST</p>
295 <p class="author">Author: Robert McIntyre</p> 281 <p class="author">Author: Robert McIntyre</p>
296 <p class="creator">Org version 7.6 with Emacs version 23</p> 282 <p class="creator">Org version 7.7 with Emacs version 23</p>
297 <a href="http://validator.w3.org/check?uri=referer">Validate XHTML 1.0</a> 283 <a href="http://validator.w3.org/check?uri=referer">Validate XHTML 1.0</a>
298 </div> 284
299 </div> 285 </div>
300 </body> 286 </body>
301 </html> 287 </html>