annotate 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
rev   line source
rlm@0 1 <?xml version="1.0" encoding="utf-8"?>
rlm@0 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
rlm@0 3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
rlm@33 4 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
rlm@0 5 <head>
rlm@33 6 <title>Steps to add a new Device to Open-AL</title>
rlm@0 7 <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
rlm@33 8 <meta name="title" content="Steps to add a new Device to Open-AL"/>
rlm@0 9 <meta name="generator" content="Org-mode"/>
rlm@33 10 <meta name="generated" content="2012-02-11 04:43:24 MST"/>
rlm@0 11 <meta name="author" content="Robert McIntyre"/>
rlm@0 12 <meta name="description" content="how to add a new device to open-al"/>
rlm@0 13 <meta name="keywords" content=""/>
rlm@0 14 <style type="text/css">
rlm@0 15 <!--/*--><![CDATA[/*><!--*/
rlm@0 16 html { font-family: Times, serif; font-size: 12pt; }
rlm@0 17 .title { text-align: center; }
rlm@0 18 .todo { color: red; }
rlm@0 19 .done { color: green; }
rlm@0 20 .tag { background-color: #add8e6; font-weight:normal }
rlm@0 21 .target { }
rlm@0 22 .timestamp { color: #bebebe; }
rlm@0 23 .timestamp-kwd { color: #5f9ea0; }
rlm@0 24 .right {margin-left:auto; margin-right:0px; text-align:right;}
rlm@0 25 .left {margin-left:0px; margin-right:auto; text-align:left;}
rlm@0 26 .center {margin-left:auto; margin-right:auto; text-align:center;}
rlm@0 27 p.verse { margin-left: 3% }
rlm@0 28 pre {
rlm@0 29 border: 1pt solid #AEBDCC;
rlm@0 30 background-color: #F3F5F7;
rlm@0 31 padding: 5pt;
rlm@0 32 font-family: courier, monospace;
rlm@0 33 font-size: 90%;
rlm@0 34 overflow:auto;
rlm@0 35 }
rlm@0 36 table { border-collapse: collapse; }
rlm@0 37 td, th { vertical-align: top; }
rlm@0 38 th.right { text-align:center; }
rlm@0 39 th.left { text-align:center; }
rlm@0 40 th.center { text-align:center; }
rlm@0 41 td.right { text-align:right; }
rlm@0 42 td.left { text-align:left; }
rlm@0 43 td.center { text-align:center; }
rlm@0 44 dt { font-weight: bold; }
rlm@0 45 div.figure { padding: 0.5em; }
rlm@0 46 div.figure p { text-align: center; }
rlm@33 47 div.inlinetask {
rlm@33 48 padding:10px;
rlm@33 49 border:2px solid gray;
rlm@33 50 margin:10px;
rlm@33 51 background: #ffffcc;
rlm@33 52 }
rlm@0 53 textarea { overflow-x: auto; }
rlm@0 54 .linenr { font-size:smaller }
rlm@0 55 .code-highlighted {background-color:#ffff00;}
rlm@0 56 .org-info-js_info-navigation { border-style:none; }
rlm@0 57 #org-info-js_console-label { font-size:10px; font-weight:bold;
rlm@0 58 white-space:nowrap; }
rlm@0 59 .org-info-js_search-highlight {background-color:#ffff00; color:#000000;
rlm@0 60 font-weight:bold; }
rlm@0 61 /*]]>*/-->
rlm@0 62 </style>
rlm@0 63 <link rel="stylesheet" type="text/css" href="/aurellem/css/aurellem.css" />
rlm@0 64 <script type="text/javascript">
rlm@0 65 <!--/*--><![CDATA[/*><!--*/
rlm@0 66 function CodeHighlightOn(elem, id)
rlm@0 67 {
rlm@0 68 var target = document.getElementById(id);
rlm@0 69 if(null != target) {
rlm@0 70 elem.cacheClassElem = elem.className;
rlm@0 71 elem.cacheClassTarget = target.className;
rlm@0 72 target.className = "code-highlighted";
rlm@0 73 elem.className = "code-highlighted";
rlm@0 74 }
rlm@0 75 }
rlm@0 76 function CodeHighlightOff(elem, id)
rlm@0 77 {
rlm@0 78 var target = document.getElementById(id);
rlm@0 79 if(elem.cacheClassElem)
rlm@0 80 elem.className = elem.cacheClassElem;
rlm@0 81 if(elem.cacheClassTarget)
rlm@0 82 target.className = elem.cacheClassTarget;
rlm@0 83 }
rlm@0 84 /*]]>*///-->
rlm@0 85 </script>
rlm@0 86
rlm@0 87 </head>
rlm@0 88 <body>
rlm@0 89
rlm@33 90
rlm@0 91 <div id="content">
rlm@33 92 <h1 class="title">Steps to add a new Device to Open-AL</h1>
rlm@0 93
rlm@0 94
rlm@0 95 <div class="header">
rlm@0 96 <div class="float-right">
rlm@0 97 <!--
rlm@0 98 <form>
rlm@0 99 <input type="text"/><input type="submit" value="search the blog &raquo;"/>
rlm@0 100 </form>
rlm@0 101 -->
rlm@0 102 </div>
rlm@0 103
rlm@0 104 <h1>aurellem <em>&#x2609;</em></h1>
rlm@0 105 <ul class="nav">
rlm@0 106 <li><a href="/">read the blog &raquo;</a></li>
rlm@0 107 <!-- li><a href="#">learn about us &raquo;</a></li-->
rlm@0 108 </ul>
rlm@0 109 </div>
rlm@0 110
rlm@0 111 <div class="author">Written by <author>Robert McIntyre</author></div>
rlm@0 112
rlm@0 113
rlm@0 114
rlm@0 115
rlm@0 116
rlm@0 117
rlm@0 118
rlm@0 119 <div id="table-of-contents">
rlm@0 120 <h2>Table of Contents</h2>
rlm@0 121 <div id="text-table-of-contents">
rlm@0 122 <ul>
rlm@33 123 <li><a href="#sec-1">1 In Alc/backends/&lt;your-device&gt;.c</a></li>
rlm@33 124 <li><a href="#sec-2">2 In OpenAL32/Include/alMain.h :</a></li>
rlm@33 125 <li><a href="#sec-3">3 In Alc/ALc.c :</a></li>
rlm@33 126 <li><a href="#sec-4">4 In CMakeLists.txt</a></li>
rlm@33 127 <li><a href="#sec-5">5 In ~/.alsoftrc</a></li>
rlm@0 128 </ul>
rlm@0 129 </div>
rlm@0 130 </div>
rlm@0 131
rlm@0 132 <div id="outline-container-1" class="outline-2">
rlm@33 133 <h2 id="sec-1"><span class="section-number-2">1</span> In Alc/backends/&lt;your-device&gt;.c</h2>
rlm@0 134 <div class="outline-text-2" id="text-1">
rlm@0 135
rlm@0 136
rlm@0 137
rlm@0 138
rlm@0 139
rlm@0 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;;
rlm@0 141
rlm@0 142 <span style="color: #dfdfbf; font-weight: bold;">ALCboolean</span> <span style="color: #f0dfaf;">alc_</span>&lt;your-device&gt;_init(BackendFuncs *func_list)
rlm@0 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>)
rlm@33 144
rlm@33 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
rlm@33 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>)
rlm@0 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)
rlm@0 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)
rlm@0 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)
rlm@33 150
rlm@0 151 </pre>
rlm@0 152
rlm@0 153
rlm@0 154
rlm@0 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>)
rlm@0 156 {
rlm@0 157 <span style="color: #f0dfaf; font-weight: bold;">switch</span>(type)
rlm@0 158 {
rlm@0 159 <span style="color: #f0dfaf; font-weight: bold;">case</span> DEVICE_PROBE:
rlm@0 160 AppendDeviceList(&lt;your-device&gt;Device);
rlm@0 161 <span style="color: #f0dfaf; font-weight: bold;">break</span>;
rlm@0 162 <span style="color: #f0dfaf; font-weight: bold;">case</span> ALL_DEVICE_PROBE:
rlm@0 163 AppendAllDeviceList(&lt;your-device&gt;Device);
rlm@0 164 <span style="color: #f0dfaf; font-weight: bold;">break</span>;
rlm@0 165 <span style="color: #f0dfaf; font-weight: bold;">case</span> CAPTURE_DEVICE_PROBE:
rlm@0 166 <span style="color: #f0dfaf; font-weight: bold;">break</span>;
rlm@0 167 }
rlm@0 168 }
rlm@0 169 </pre>
rlm@0 170
rlm@0 171
rlm@0 172
rlm@0 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 = {
rlm@0 174 &lt;your-device&gt;_open_playback,
rlm@0 175 &lt;your-device&gt;_close_playback,
rlm@0 176 &lt;your-device&gt;_reset_playback,
rlm@0 177 &lt;your-device&gt;_stop_playback,
rlm@0 178 <span style="color: #dca3a3; font-weight: bold;">NULL</span>,
rlm@0 179 <span style="color: #dca3a3; font-weight: bold;">NULL</span>,
rlm@0 180 <span style="color: #dca3a3; font-weight: bold;">NULL</span>,
rlm@0 181 <span style="color: #dca3a3; font-weight: bold;">NULL</span>,
rlm@0 182 <span style="color: #dca3a3; font-weight: bold;">NULL</span>,
rlm@0 183 <span style="color: #dca3a3; font-weight: bold;">NULL</span>
rlm@0 184 };
rlm@0 185 </pre>
rlm@0 186
rlm@0 187
rlm@0 188
rlm@0 189 </div>
rlm@0 190
rlm@0 191 </div>
rlm@0 192
rlm@33 193 <div id="outline-container-2" class="outline-2">
rlm@33 194 <h2 id="sec-2"><span class="section-number-2">2</span> In OpenAL32/Include/alMain.h :</h2>
rlm@33 195 <div class="outline-text-2" id="text-2">
rlm@0 196
rlm@0 197
rlm@0 198
rlm@0 199
rlm@0 200
rlm@0 201 <pre class="src src-C"><span style="color: #dfdfbf; font-weight: bold;">ALCboolean</span> <span style="color: #f0dfaf;">alc_</span>&lt;your-device&gt;_init(BackendFuncs *func_list);
rlm@0 202 <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>);
rlm@0 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>);
rlm@0 204
rlm@0 205 </pre>
rlm@0 206
rlm@0 207
rlm@33 208 </div>
rlm@33 209
rlm@33 210 </div>
rlm@33 211
rlm@33 212 <div id="outline-container-3" class="outline-2">
rlm@33 213 <h2 id="sec-3"><span class="section-number-2">3</span> In Alc/ALc.c :</h2>
rlm@33 214 <div class="outline-text-2" id="text-3">
rlm@33 215
rlm@33 216
rlm@33 217
rlm@33 218
rlm@33 219 <pre class="src src-C"> { <span style="color: #cc9393;">"&lt;your-device&gt;"</span>, alc_&lt;your-device&gt;_init,
rlm@33 220 alc_&lt;your-device&gt;_deinit, alc_&lt;your-device&gt;_probe, EmptyFuncs },
rlm@33 221
rlm@33 222 </pre>
rlm@0 223
rlm@0 224
rlm@0 225 </div>
rlm@0 226
rlm@0 227 </div>
rlm@0 228
rlm@0 229 <div id="outline-container-4" class="outline-2">
rlm@33 230 <h2 id="sec-4"><span class="section-number-2">4</span> In CMakeLists.txt</h2>
rlm@0 231 <div class="outline-text-2" id="text-4">
rlm@0 232
rlm@0 233
rlm@0 234
rlm@0 235
rlm@0 236 <pre class="src src-cmake">SET(ALC_OBJS Alc/ALc.c
rlm@0 237 Alc/ALu.c
rlm@0 238 Alc/alcConfig.c
rlm@0 239 Alc/alcDedicated.c
rlm@0 240 Alc/alcEcho.c
rlm@0 241 Alc/alcModulator.c
rlm@0 242 Alc/alcReverb.c
rlm@0 243 Alc/alcRing.c
rlm@0 244 Alc/alcThread.c
rlm@0 245 Alc/bs2b.c
rlm@0 246 Alc/helpers.c
rlm@0 247 Alc/hrtf.c
rlm@0 248 Alc/mixer.c
rlm@0 249 Alc/panning.c
rlm@0 250 # Default backends, always available
rlm@0 251 Alc/backends/loopback.c
rlm@0 252 Alc/backends/null.c
rlm@33 253 # : add &lt;your-device&gt; herex
rlm@0 254 Alc/backends/&lt;your-device&gt;.c
rlm@0 255 )
rlm@0 256 </pre>
rlm@0 257
rlm@0 258
rlm@0 259
rlm@0 260 </div>
rlm@0 261
rlm@0 262 </div>
rlm@0 263
rlm@33 264 <div id="outline-container-5" class="outline-2">
rlm@33 265 <h2 id="sec-5"><span class="section-number-2">5</span> In ~/.alsoftrc</h2>
rlm@33 266 <div class="outline-text-2" id="text-5">
rlm@0 267
rlm@0 268
rlm@0 269
rlm@0 270
rlm@0 271
rlm@0 272 <pre class="src src-conf"><span style="color: #f0dfaf;">drivers</span> = &lt;your-device&gt;
rlm@0 273 </pre>
rlm@0 274
rlm@33 275 </div>
rlm@33 276 </div>
rlm@33 277 </div>
rlm@0 278
rlm@33 279 <div id="postamble">
rlm@33 280 <p class="date">Date: 2012-02-11 04:43:24 MST</p>
rlm@33 281 <p class="author">Author: Robert McIntyre</p>
rlm@33 282 <p class="creator">Org version 7.7 with Emacs version 23</p>
rlm@33 283 <a href="http://validator.w3.org/check?uri=referer">Validate XHTML 1.0</a>
rlm@0 284
rlm@0 285 </div>
rlm@0 286 </body>
rlm@0 287 </html>