changeset 33:3caceef436ea tip

formatting for web
author Robert McIntyre <rlm@mit.edu>
date Sat, 11 Feb 2012 12:25:55 -0700
parents b8bc24918d63
children
files Alc/backends/send.c html/add-new-device.html org/add-new-device.org
diffstat 3 files changed, 59 insertions(+), 75 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/Alc/backends/send.c	Sat Feb 04 01:43:33 2012 -0700
     1.2 +++ b/Alc/backends/send.c	Sat Feb 11 12:25:55 2012 -0700
     1.3 @@ -233,7 +233,6 @@
     1.4    addContext(Device, masterContext);
     1.5  }
     1.6  
     1.7 -
     1.8  static void renderData(ALCdevice *Device, int samples){
     1.9    if(!Device->Connected){return;}
    1.10    send_data *data = (send_data*)Device->ExtraData;
     2.1 --- a/html/add-new-device.html	Sat Feb 04 01:43:33 2012 -0700
     2.2 +++ b/html/add-new-device.html	Sat Feb 11 12:25:55 2012 -0700
     2.3 @@ -1,13 +1,13 @@
     2.4  <?xml version="1.0" encoding="utf-8"?>
     2.5  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     2.6                 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
     2.7 -<html xmlns="http://www.w3.org/1999/xhtml"
     2.8 -lang="en" xml:lang="en">
     2.9 +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    2.10  <head>
    2.11 -<title>all the steps to add a device to open-al</title>
    2.12 +<title>Steps to add a new Device to Open-AL</title>
    2.13  <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    2.14 +<meta name="title" content="Steps to add a new Device to Open-AL"/>
    2.15  <meta name="generator" content="Org-mode"/>
    2.16 -<meta name="generated" content="2011-10-20 15:48:47 MST"/>
    2.17 +<meta name="generated" content="2012-02-11 04:43:24 MST"/>
    2.18  <meta name="author" content="Robert McIntyre"/>
    2.19  <meta name="description" content="how to add a new device to open-al"/>
    2.20  <meta name="keywords" content=""/>
    2.21 @@ -44,6 +44,12 @@
    2.22    dt { font-weight: bold; }
    2.23    div.figure { padding: 0.5em; }
    2.24    div.figure p { text-align: center; }
    2.25 +  div.inlinetask {
    2.26 +    padding:10px;
    2.27 +    border:2px solid gray;
    2.28 +    margin:10px;
    2.29 +    background: #ffffcc;
    2.30 +  }
    2.31    textarea { overflow-x: auto; }
    2.32    .linenr { font-size:smaller }
    2.33    .code-highlighted {background-color:#ffff00;}
    2.34 @@ -81,8 +87,9 @@
    2.35  </head>
    2.36  <body>
    2.37  
    2.38 +
    2.39  <div id="content">
    2.40 -
    2.41 +<h1 class="title">Steps to add a new Device to Open-AL</h1>
    2.42  
    2.43  
    2.44  <div class="header">
    2.45 @@ -101,7 +108,6 @@
    2.46    </ul>
    2.47  </div>
    2.48  
    2.49 -<h1 class="title">all the steps to add a device to open-al</h1>
    2.50  <div class="author">Written by <author>Robert McIntyre</author></div>
    2.51  
    2.52  
    2.53 @@ -114,30 +120,20 @@
    2.54  <h2>Table of Contents</h2>
    2.55  <div id="text-table-of-contents">
    2.56  <ul>
    2.57 -<li><a href="#sec-1">1 How to add a new backend device </a></li>
    2.58 -<li><a href="#sec-2">2 In Alc/backends/&lt;your-device&gt;.c </a></li>
    2.59 -<li><a href="#sec-3">3 In OpenAL32/Include/alMain.h : </a></li>
    2.60 -<li><a href="#sec-4">4 In Alc/ALc.c : </a></li>
    2.61 -<li><a href="#sec-5">5 In CMakeLists.txt </a></li>
    2.62 -<li><a href="#sec-6">6 In ~/.alsoftrc </a></li>
    2.63 +<li><a href="#sec-1">1 In Alc/backends/&lt;your-device&gt;.c</a></li>
    2.64 +<li><a href="#sec-2">2 In OpenAL32/Include/alMain.h :</a></li>
    2.65 +<li><a href="#sec-3">3 In Alc/ALc.c :</a></li>
    2.66 +<li><a href="#sec-4">4 In CMakeLists.txt</a></li>
    2.67 +<li><a href="#sec-5">5 In ~/.alsoftrc</a></li>
    2.68  </ul>
    2.69  </div>
    2.70  </div>
    2.71  
    2.72  <div id="outline-container-1" class="outline-2">
    2.73 -<h2 id="sec-1"><span class="section-number-2">1</span> How to add a new backend device </h2>
    2.74 +<h2 id="sec-1"><span class="section-number-2">1</span> In Alc/backends/&lt;your-device&gt;.c</h2>
    2.75  <div class="outline-text-2" id="text-1">
    2.76  
    2.77  
    2.78 -</div>
    2.79 -
    2.80 -</div>
    2.81 -
    2.82 -<div id="outline-container-2" class="outline-2">
    2.83 -<h2 id="sec-2"><span class="section-number-2">2</span> In Alc/backends/&lt;your-device&gt;.c </h2>
    2.84 -<div class="outline-text-2" id="text-2">
    2.85 -
    2.86 -
    2.87  
    2.88  
    2.89  
    2.90 @@ -145,17 +141,17 @@
    2.91  
    2.92  <span style="color: #dfdfbf; font-weight: bold;">ALCboolean</span> <span style="color: #f0dfaf;">alc_</span>&lt;your-device&gt;_init(BackendFuncs *func_list)
    2.93  <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>)
    2.94 -
    2.95 -<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>)
    2.96 +  
    2.97 +<span style="color: #f0dfaf; font-weight: bold;">static</span> <span style="color: #dfdfbf; font-weight: bold;">ALCboolean</span> &lt;your-device&gt;_open_playback
    2.98 +  (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>)
    2.99  <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)
   2.100  <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)
   2.101  <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)
   2.102 +
   2.103  </pre>
   2.104  
   2.105  
   2.106  
   2.107 -
   2.108 -
   2.109  <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>)
   2.110  {
   2.111      <span style="color: #f0dfaf; font-weight: bold;">switch</span>(type)
   2.112 @@ -174,8 +170,6 @@
   2.113  
   2.114  
   2.115  
   2.116 -
   2.117 -
   2.118  <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 = {
   2.119      &lt;your-device&gt;_open_playback,
   2.120      &lt;your-device&gt;_close_playback,
   2.121 @@ -192,15 +186,13 @@
   2.122  
   2.123  
   2.124  
   2.125 -
   2.126 -
   2.127  </div>
   2.128  
   2.129  </div>
   2.130  
   2.131 -<div id="outline-container-3" class="outline-2">
   2.132 -<h2 id="sec-3"><span class="section-number-2">3</span> In OpenAL32/Include/alMain.h : </h2>
   2.133 -<div class="outline-text-2" id="text-3">
   2.134 +<div id="outline-container-2" class="outline-2">
   2.135 +<h2 id="sec-2"><span class="section-number-2">2</span> In OpenAL32/Include/alMain.h :</h2>
   2.136 +<div class="outline-text-2" id="text-2">
   2.137  
   2.138  
   2.139  
   2.140 @@ -213,6 +205,21 @@
   2.141  </pre>
   2.142  
   2.143  
   2.144 +</div>
   2.145 +
   2.146 +</div>
   2.147 +
   2.148 +<div id="outline-container-3" class="outline-2">
   2.149 +<h2 id="sec-3"><span class="section-number-2">3</span> In Alc/ALc.c :</h2>
   2.150 +<div class="outline-text-2" id="text-3">
   2.151 +
   2.152 +
   2.153 +
   2.154 +
   2.155 +<pre class="src src-C">     { <span style="color: #cc9393;">"&lt;your-device&gt;"</span>, alc_&lt;your-device&gt;_init, 
   2.156 +         alc_&lt;your-device&gt;_deinit, alc_&lt;your-device&gt;_probe, EmptyFuncs },
   2.157 +
   2.158 +</pre>
   2.159  
   2.160  
   2.161  </div>
   2.162 @@ -220,31 +227,12 @@
   2.163  </div>
   2.164  
   2.165  <div id="outline-container-4" class="outline-2">
   2.166 -<h2 id="sec-4"><span class="section-number-2">4</span> In Alc/ALc.c : </h2>
   2.167 +<h2 id="sec-4"><span class="section-number-2">4</span> In CMakeLists.txt</h2>
   2.168  <div class="outline-text-2" id="text-4">
   2.169  
   2.170  
   2.171  
   2.172  
   2.173 -<pre class="src src-C">     { <span style="color: #cc9393;">"&lt;your-device&gt;"</span>, alc_&lt;your-device&gt;_init, 
   2.174 -         alc_&lt;your-device&gt;_deinit, alc_&lt;your-device&gt;_probe, EmptyFuncs },
   2.175 -
   2.176 -</pre>
   2.177 -
   2.178 -
   2.179 -
   2.180 -
   2.181 -</div>
   2.182 -
   2.183 -</div>
   2.184 -
   2.185 -<div id="outline-container-5" class="outline-2">
   2.186 -<h2 id="sec-5"><span class="section-number-2">5</span> In CMakeLists.txt </h2>
   2.187 -<div class="outline-text-2" id="text-5">
   2.188 -
   2.189 -
   2.190 -
   2.191 -
   2.192  <pre class="src src-cmake">SET(ALC_OBJS  Alc/ALc.c
   2.193                Alc/ALu.c
   2.194                Alc/alcConfig.c
   2.195 @@ -262,22 +250,20 @@
   2.196                # Default backends, always available
   2.197                Alc/backends/loopback.c
   2.198                Alc/backends/null.c
   2.199 -              # : add &lt;your-device&gt; device
   2.200 +              # : add &lt;your-device&gt; herex
   2.201                Alc/backends/&lt;your-device&gt;.c
   2.202  )
   2.203  </pre>
   2.204  
   2.205  
   2.206  
   2.207 -
   2.208 -
   2.209  </div>
   2.210  
   2.211  </div>
   2.212  
   2.213 -<div id="outline-container-6" class="outline-2">
   2.214 -<h2 id="sec-6"><span class="section-number-2">6</span> In ~/.alsoftrc </h2>
   2.215 -<div class="outline-text-2" id="text-6">
   2.216 +<div id="outline-container-5" class="outline-2">
   2.217 +<h2 id="sec-5"><span class="section-number-2">5</span> In ~/.alsoftrc</h2>
   2.218 +<div class="outline-text-2" id="text-5">
   2.219  
   2.220  
   2.221  
   2.222 @@ -286,16 +272,16 @@
   2.223  <pre class="src src-conf"><span style="color: #f0dfaf;">drivers</span> = &lt;your-device&gt;
   2.224  </pre>
   2.225  
   2.226 +</div>
   2.227 +</div>
   2.228 +</div>
   2.229  
   2.230 +<div id="postamble">
   2.231 +<p class="date">Date: 2012-02-11 04:43:24 MST</p>
   2.232 +<p class="author">Author: Robert McIntyre</p>
   2.233 +<p class="creator">Org version 7.7 with Emacs version 23</p>
   2.234 +<a href="http://validator.w3.org/check?uri=referer">Validate XHTML 1.0</a>
   2.235  
   2.236  </div>
   2.237 -</div>
   2.238 -<div id="postamble">
   2.239 -<p class="date">Date: 2011-10-20 15:48:47 MST</p>
   2.240 -<p class="author">Author: Robert McIntyre</p>
   2.241 -<p class="creator">Org version 7.6 with Emacs version 23</p>
   2.242 -<a href="http://validator.w3.org/check?uri=referer">Validate XHTML 1.0</a>
   2.243 -</div>
   2.244 -</div>
   2.245  </body>
   2.246  </html>
     3.1 --- a/org/add-new-device.org	Sat Feb 04 01:43:33 2012 -0700
     3.2 +++ b/org/add-new-device.org	Sat Feb 11 12:25:55 2012 -0700
     3.3 @@ -1,13 +1,10 @@
     3.4 -#+title: all the steps to add a device to open-al
     3.5 +#+title: Steps to add a new Device to Open-AL
     3.6  #+author: Robert McIntyre
     3.7  #+email: rlm@mit.edu
     3.8  #+description: how to add a new device to open-al
     3.9  #+SETUPFILE: ../../aurellem/org/setup.org
    3.10  #+INCLUDE: ../../aurellem/org/level-0.org
    3.11  
    3.12 -
    3.13 -* How to add a new backend device
    3.14 -
    3.15  * In Alc/backends/<your-device>.c 
    3.16     
    3.17  #+begin_src C
    3.18 @@ -15,11 +12,13 @@
    3.19  
    3.20  ALCboolean alc_<your-device>_init(BackendFuncs *func_list)
    3.21  void alc_<your-device>_deinit(void)
    3.22 -
    3.23 -static ALCboolean <your-device>_open_playback(ALCdevice *device, const ALCchar *deviceName)
    3.24 +  
    3.25 +static ALCboolean <your-device>_open_playback
    3.26 +  (ALCdevice *device,const ALCchar *deviceName)
    3.27  static void <your-device>_close_playback(ALCdevice *device)
    3.28  static ALCboolean <your-device>_reset_playback(ALCdevice *device)
    3.29  static void <your-device>_stop_playback(ALCdevice *device)
    3.30 +
    3.31  #+end_src
    3.32  
    3.33  #+begin_src C
    3.34 @@ -90,7 +89,7 @@
    3.35                # Default backends, always available
    3.36                Alc/backends/loopback.c
    3.37                Alc/backends/null.c
    3.38 -	      # : add <your-device> device
    3.39 +	      # : add <your-device> herex
    3.40  	      Alc/backends/<your-device>.c
    3.41  )
    3.42  #+end_src