diff options
author | neodarz <neodarz@neodarz.net> | 2018-08-11 20:21:34 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2018-08-11 20:21:34 +0200 |
commit | 0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch) | |
tree | 2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /docs/doxygen/nel/a03418.html | |
download | nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip |
Initial commit
Diffstat (limited to 'docs/doxygen/nel/a03418.html')
-rw-r--r-- | docs/doxygen/nel/a03418.html | 1776 |
1 files changed, 1776 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03418.html b/docs/doxygen/nel/a03418.html new file mode 100644 index 00000000..fa0271fa --- /dev/null +++ b/docs/doxygen/nel/a03418.html @@ -0,0 +1,1776 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>NeL: NLSOUND::CSoundDriverAL class Reference</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.3.6 --> +<div class="qindex"> <form class="search" action="search.php" method="get"> +<a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a> | <span class="search"><u>S</u>earch for <input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div> +<h1>NLSOUND::CSoundDriverAL Class Reference</h1><code>#include <<a class="el" href="a06419.html">sound_driver_al.h</a>></code> +<p> +<p>Inheritance diagram for NLSOUND::CSoundDriverAL: +<p><center><img src="a03418.png" usemap="#NLSOUND::CSoundDriverAL_map" border="0" alt=""></center> +<map name="NLSOUND::CSoundDriverAL_map"> +<area href="a03419.html" alt="NLSOUND::ISoundDriver" shape="rect" coords="0,0,175,24"> +</map> +<hr><a name="_details"></a><h2>Detailed Description</h2> +OpenAL sound driver<p> +The caller of the create methods is responsible for the deletion of the created objects These objects must be deleted before deleting the <a class="el" href="a03419.html">ISoundDriver</a> instance.<p> +<dl compact><dt><b>Author:</b></dt><dd>Olivier Cado <p> +Nevrax France </dd></dl> +<dl compact><dt><b>Date:</b></dt><dd>2001 </dd></dl> + +<p> + +<p> +Definition at line <a class="el" href="a06419.html#l00091">91</a> of file <a class="el" href="a06419.html">sound_driver_al.h</a>.<table border=0 cellpadding=0 cellspacing=0> +<tr><td></td></tr> +<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa0">applyRolloffFactor</a> (float f)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Change the rolloff factor and apply to all sources. <a href="#NLSOUND_1_1CSoundDriverALa0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa1">commit3DChanges</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Commit all the changes made to 3D settings of listener and sources. <a href="#NLSOUND_1_1CSoundDriverALa1"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa2">countMaxSources</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the maximum number of sources that can created. <a href="#NLSOUND_1_1CSoundDriverALa2"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a02298.html">IBuffer</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa3">createBuffer</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a sound buffer. <a href="#NLSOUND_1_1CSoundDriverALa3"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a03861.html">IListener</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa4">createListener</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Create the listener instance. <a href="#NLSOUND_1_1CSoundDriverALa4"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a03428.html">ISource</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa5">createSource</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a source. <a href="#NLSOUND_1_1CSoundDriverALa5"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa6">CSoundDriverAL</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#NLSOUND_1_1CSoundDriverALa6"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa7">displayBench</a> (<a class="el" href="a02813.html">NLMISC::CLog</a> *log)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa8">endBench</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa9">init</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Initialization. <a href="#NLSOUND_1_1CSoundDriverALa9"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa10">loadWavFile</a> (<a class="el" href="a02298.html">IBuffer</a> *destbuffer, const char *<a class="el" href="a04560.html#a1">filename</a>)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Temp. <a href="#NLSOUND_1_1CSoundDriverALa10"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa11">readRawBuffer</a> (<a class="el" href="a02298.html">IBuffer</a> *destbuffer, const std::string &name, <a class="el" href="a04558.html#a7">uint8</a> *rawData, <a class="el" href="a04558.html#a15">uint</a> dataSize, <a class="el" href="a05381.html#a80">TSampleFormat</a> <a class="el" href="a04223.html#a641">format</a>, <a class="el" href="a04558.html#a11">uint32</a> frequency)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa12">readWavBuffer</a> (<a class="el" href="a02298.html">IBuffer</a> *destbuffer, const std::string &name, <a class="el" href="a04558.html#a7">uint8</a> *wavData, <a class="el" href="a04558.html#a15">uint</a> dataSize)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Temp. <a href="#NLSOUND_1_1CSoundDriverALa12"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa13">startBench</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa14">writeProfile</a> (std::ostream &out)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Write information about the driver to the output stream. <a href="#NLSOUND_1_1CSoundDriverALa14"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa15">~CSoundDriverAL</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#NLSOUND_1_1CSoundDriverALa15"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03419.html">ISoundDriver</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivere0">createDriver</a> (bool useEax, IStringMapperProvider *stringMapper)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03418.html">CSoundDriverAL</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALe1">instance</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the instance of the singleton. <a href="#NLSOUND_1_1CSoundDriverALe1"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Static Public Attributes</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivers0">InterfaceVersion</a> = 0x08</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Version of the driver interface. To increment when the interface change. <a href="#NLSOUND_1_1ISoundDrivers0"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Protected Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALb0">allocateNewItems</a> (<a class="el" href="a05381.html#a11">TGenFunctionAL</a> algenfunc, <a class="el" href="a05381.html#a12">TTestFunctionAL</a> altestfunc, std::vector< ALuint > &names, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a566">index</a>, <a class="el" href="a04558.html#a15">uint</a> nb)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocate nb new buffers or sources. <a href="#NLSOUND_1_1CSoundDriverALb0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>friend </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALb1">CBufferAL::~CBufferAL</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALb2">compactAliveNames</a> (std::vector< ALuint > &names, <a class="el" href="a05381.html#a12">TTestFunctionAL</a> testfunc)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove names of deleted items and return the number of valid items. <a href="#NLSOUND_1_1CSoundDriverALb2"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>ALuint </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALb3">createItem</a> (<a class="el" href="a05381.html#a11">TGenFunctionAL</a> algenfunc, <a class="el" href="a05381.html#a12">TTestFunctionAL</a> altestfunc, std::vector< ALuint > &names, <a class="el" href="a04558.html#a15">uint</a> &<a class="el" href="a04223.html#a566">index</a>, <a class="el" href="a04558.html#a15">uint</a> allocrate)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a sound buffer or a sound source. <a href="#NLSOUND_1_1CSoundDriverALb3"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>friend </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALb4">CSourceAL::~CSourceAL</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALb5">deleteItem</a> (ALuint name, <a class="el" href="a05381.html#a11">TGenFunctionAL</a> aldeletefunc, std::vector< ALuint > &names)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Delete a buffer or a source. <a href="#NLSOUND_1_1CSoundDriverALb5"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALb6">generateItems</a> (<a class="el" href="a05381.html#a11">TGenFunctionAL</a> algenfunc, <a class="el" href="a05381.html#a12">TTestFunctionAL</a> altestfunc, <a class="el" href="a04558.html#a15">uint</a> nb, ALuint *array)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Generate nb buffers. <a href="#NLSOUND_1_1CSoundDriverALb6"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALb7">removeBuffer</a> (<a class="el" href="a02298.html">IBuffer</a> *<a class="el" href="a04223.html#a589">buffer</a>)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove a buffer. <a href="#NLSOUND_1_1CSoundDriverALb7"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALb8">removeSource</a> (<a class="el" href="a03428.html">ISource</a> *source)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove a source. <a href="#NLSOUND_1_1CSoundDriverALb8"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< ALuint > </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALr0">_Buffers</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALr1">_NbExpBuffers</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALr2">_NbExpSources</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALr3">_RolloffFactor</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< ALuint > </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALr4">_Sources</a></td></tr> + +<tr><td colspan=2><br><h2>Static Private Attributes</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03418.html">CSoundDriverAL</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALv0">_Instance</a> = NULL</td></tr> + +</table> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALa6" doxytag="NLSOUND::CSoundDriverAL::CSoundDriverAL" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> NLSOUND::CSoundDriverAL::CSoundDriverAL </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Constructor. +<p> + +<p> +Definition at line <a class="el" href="a06418.html#l00129">129</a> of file <a class="el" href="a06418.html">sound_driver_al.cpp</a>. +<p> +References <a class="el" href="a05622.html#l00154">nlerror</a>. +<p> +<div class="fragment"><pre>00129 : +00130 <a class="code" href="a03419.html#NLSOUND_1_1ISoundDriverb0">ISoundDriver</a>(), <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALr1">_NbExpBuffers</a>( 0 ), <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALr2">_NbExpSources</a>( 0 ), <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALr3">_RolloffFactor</a>( 1.0f ) +00131 { +00132 <span class="keywordflow">if</span> ( <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALv0">_Instance</a> == NULL ) +00133 { +00134 <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALv0">_Instance</a> = <span class="keyword">this</span>; +00135 } +00136 <span class="keywordflow">else</span> +00137 { +00138 <a class="code" href="a04199.html#a3">nlerror</a>( <span class="stringliteral">"Sound driver singleton instanciated twice"</span> ); +00139 } +00140 } + +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALa15" doxytag="NLSOUND::CSoundDriverAL::~CSoundDriverAL" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> NLSOUND::CSoundDriverAL::~<a class="el" href="a03418.html">CSoundDriverAL</a> </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Destructor. +<p> + +<p> +Definition at line <a class="el" href="a06418.html#l00146">146</a> of file <a class="el" href="a06418.html">sound_driver_al.cpp</a>. +<p> +References <a class="el" href="a06419.html#l00180">_Buffers</a>, and <a class="el" href="a06418.html#l00323">compactAliveNames()</a>. +<p> +<div class="fragment"><pre>00147 { +00148 <span class="comment">// Remove the allocated (but not exported) source and buffer names</span> +00149 alDeleteSources( <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALb2">compactAliveNames</a>( _Sources, alIsSource ), &*<a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALr4">_Sources</a>.begin() ); +00150 alDeleteBuffers( <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALb2">compactAliveNames</a>( _Buffers, alIsBuffer ), &*<a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALr0">_Buffers</a>.begin() ); +00151 +00152 <span class="comment">// OpenAL exit</span> +00153 alutExit(); +00154 +00155 <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALv0">_Instance</a> = NULL; +00156 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALb1" doxytag="NLSOUND::CSoundDriverAL::CBufferAL::~CBufferAL" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> NLSOUND::CSoundDriverAL::CBufferAL::~<a class="el" href="a02297.html">CBufferAL</a> </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [protected]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALb4" doxytag="NLSOUND::CSoundDriverAL::CSourceAL::~CSourceAL" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> NLSOUND::CSoundDriverAL::CSourceAL::~<a class="el" href="a03427.html">CSourceAL</a> </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [protected]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + </td> + </tr> +</table> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALb0" doxytag="NLSOUND::CSoundDriverAL::allocateNewItems" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLSOUND::CSoundDriverAL::allocateNewItems </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a05381.html#a11">TGenFunctionAL</a> </td> + <td class="mdname" nowrap> <em>algenfunc</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a05381.html#a12">TTestFunctionAL</a> </td> + <td class="mdname" nowrap> <em>altestfunc</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>std::vector< ALuint > & </td> + <td class="mdname" nowrap> <em>names</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>index</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>nb</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [protected]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Allocate nb new buffers or sources. +<p> + +<p> +Definition at line <a class="el" href="a06418.html#l00215">215</a> of file <a class="el" href="a06418.html">sound_driver_al.cpp</a>. +<p> +References <a class="el" href="a06418.html#l00240">generateItems()</a>, <a class="el" href="a05646.html#l00225">index</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06419.html#l00055">NLSOUND::TGenFunctionAL</a>, <a class="el" href="a06419.html#l00059">NLSOUND::TTestFunctionAL</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a06418.html#l00289">createItem()</a>, and <a class="el" href="a06418.html#l00162">init()</a>. +<p> +<div class="fragment"><pre>00217 { +00218 <a class="code" href="a04199.html#a6">nlassert</a>( index == names.size() ); +00219 names.resize( index + nb ); +00220 <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALb6">generateItems</a>( algenfunc, altestfunc, nb, &(names[index]) ); +00221 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALa0" doxytag="NLSOUND::CSoundDriverAL::applyRolloffFactor" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLSOUND::CSoundDriverAL::applyRolloffFactor </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">float </td> + <td class="mdname1" valign="top" nowrap> <em>f</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Change the rolloff factor and apply to all sources. +<p> + +<p> +Definition at line <a class="el" href="a06418.html#l00400">400</a> of file <a class="el" href="a06418.html">sound_driver_al.cpp</a>. +<p> +References <a class="el" href="a06419.html#l00192">_RolloffFactor</a>, and <a class="el" href="a06419.html#l00074">TestALError</a>. +<p> +<div class="fragment"><pre>00401 { +00402 <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALr3">_RolloffFactor</a> = f; +00403 vector<ALuint>::iterator ibn; +00404 <span class="keywordflow">for</span> ( ibn=<a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALr4">_Sources</a>.begin(); ibn!=<a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALr4">_Sources</a>.end(); ++ibn ) +00405 { +00406 alSourcef( *ibn, AL_ROLLOFF_FACTOR, _RolloffFactor ); +00407 } +00408 <a class="code" href="a04996.html#a0">TestALError</a>(); +00409 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALa1" doxytag="NLSOUND::CSoundDriverAL::commit3DChanges" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> virtual void NLSOUND::CSoundDriverAL::commit3DChanges </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Commit all the changes made to 3D settings of listener and sources. +<p> + +<p> +Implements <a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera0">NLSOUND::ISoundDriver</a>. +<p> +Definition at line <a class="el" href="a06419.html#l00132">132</a> of file <a class="el" href="a06419.html">sound_driver_al.h</a>. +<p> +<div class="fragment"><pre>00132 {} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALb2" doxytag="NLSOUND::CSoundDriverAL::compactAliveNames" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> NLSOUND::CSoundDriverAL::compactAliveNames </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">std::vector< ALuint > & </td> + <td class="mdname" nowrap> <em>names</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a05381.html#a12">TTestFunctionAL</a> </td> + <td class="mdname" nowrap> <em>testfunc</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [protected]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Remove names of deleted items and return the number of valid items. +<p> + +<p> +Definition at line <a class="el" href="a06418.html#l00323">323</a> of file <a class="el" href="a06418.html">sound_driver_al.cpp</a>. +<p> +References <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06419.html#l00059">NLSOUND::TTestFunctionAL</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a06418.html#l00289">createItem()</a>, and <a class="el" href="a06418.html#l00146">~CSoundDriverAL()</a>. +<p> +<div class="fragment"><pre>00324 { +00325 vector<ALuint>::iterator iball, ibcompacted; +00326 <span class="keywordflow">for</span> ( iball=names.begin(), ibcompacted=names.begin(); iball!=names.end(); ++iball ) +00327 { +00328 <span class="comment">// iball is incremented every iteration</span> +00329 <span class="comment">// ibcompacted is not incremented if a buffer is not valid anymore</span> +00330 <span class="keywordflow">if</span> ( altestfunc( *iball ) ) +00331 { +00332 *ibcompacted = *iball; +00333 ++ibcompacted; +00334 } +00335 } +00336 <a class="code" href="a04199.html#a6">nlassert</a>( ibcompacted <= names.end() ); +00337 <span class="keywordflow">return</span> ibcompacted - names.begin(); +00338 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALa2" doxytag="NLSOUND::CSoundDriverAL::countMaxSources" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> virtual <a class="el" href="a04558.html#a15">uint</a> NLSOUND::CSoundDriverAL::countMaxSources </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the maximum number of sources that can created. +<p> + +<p> +Implements <a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera1">NLSOUND::ISoundDriver</a>. +<p> +Definition at line <a class="el" href="a06419.html#l00111">111</a> of file <a class="el" href="a06419.html">sound_driver_al.h</a>. +<p> +References <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>00111 { <span class="keywordflow">return</span> 32; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALa3" doxytag="NLSOUND::CSoundDriverAL::createBuffer" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a02298.html">IBuffer</a> * NLSOUND::CSoundDriverAL::createBuffer </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Create a sound buffer. +<p> + +<p> +Implements <a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera2">NLSOUND::ISoundDriver</a>. +<p> +Definition at line <a class="el" href="a06418.html#l00264">264</a> of file <a class="el" href="a06418.html">sound_driver_al.cpp</a>. +<p> +References <a class="el" href="a06419.html#l00180">_Buffers</a>, <a class="el" href="a06419.html#l00186">_NbExpBuffers</a>, <a class="el" href="a06418.html#l00078">BUFFER_ALLOC_RATE</a>, and <a class="el" href="a06418.html#l00289">createItem()</a>. +<p> +<div class="fragment"><pre>00265 { +00266 NL_ALLOC_CONTEXT(NLSOUND_CSoundDriverAL); +00267 <span class="keywordflow">return</span> <span class="keyword">new</span> CBufferAL( <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALb3">createItem</a>( alGenBuffers, alIsBuffer, _Buffers, _NbExpBuffers, BUFFER_ALLOC_RATE ) ); +00268 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1ISoundDrivere0" doxytag="NLSOUND::CSoundDriverAL::createDriver" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03419.html">ISoundDriver</a> * NLSOUND::ISoundDriver::createDriver </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">bool </td> + <td class="mdname" nowrap> <em>useEax</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a03878.html">IStringMapperProvider</a> * </td> + <td class="mdname" nowrap> <em>stringMapper</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [static, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +The static method which builds the sound driver instance In case of failure, can throw one of these <a class="el" href="a03814.html">ESoundDriver</a> exception objects: <a class="el" href="a03819.html">ESoundDriverNotFound</a>, <a class="el" href="a03816.html">ESoundDriverCorrupted</a>, <a class="el" href="a03821.html">ESoundDriverOldVersion</a>, <a class="el" href="a03822.html">ESoundDriverUnknownVersion</a><p> +You can request support for EAX. If EAX is requested and if there is enougth hardware buffer replay, then only hardware buffer are created when calling createBuffer. If the number of available hardware buffer is less than 10, then EAX is ignored. +<p> +Definition at line <a class="el" href="a06416.html#l00061">61</a> of file <a class="el" href="a06416.html">sound_driver.cpp</a>. +<p> +References <a class="el" href="a05646.html#l00649">buffer</a>, <a class="el" href="a06416.html#l00050">NLSOUND::ISDRV_CREATE_PROC</a>, <a class="el" href="a06416.html#l00053">NLSOUND::ISDRV_VERSION_PROC</a>, <a class="el" href="a05622.html#l00111">nlinfo</a>, and <a class="el" href="a05622.html#l00135">nlwarning</a>. +<p> +<div class="fragment"><pre>00062 { +00063 <a class="code" href="a05381.html#a13">ISDRV_CREATE_PROC</a> createSoundDriver = NULL; +00064 <a class="code" href="a05381.html#a15">ISDRV_VERSION_PROC</a> versionDriver = NULL; +00065 +00066 <span class="preprocessor">#ifdef NL_OS_WINDOWS</span> +00067 <span class="preprocessor"></span> +00068 <span class="comment">// WINDOWS code.</span> +00069 HINSTANCE hInst; +00070 +00071 hInst = LoadLibrary(NLSOUND_DLL_NAME); +00072 +00073 <span class="keywordflow">if</span> (!hInst) +00074 { +00075 <span class="keywordflow">throw</span> ESoundDriverNotFound(); +00076 } +00077 +00078 <span class="keywordtype">char</span> <a class="code" href="a04223.html#a589">buffer</a>[1024], *ptr; +00079 SearchPath (NULL, NLSOUND_DLL_NAME, NULL, 1023, buffer, &ptr); +00080 <a class="code" href="a04199.html#a1">nlinfo</a> (<span class="stringliteral">"Using the library '"</span>NLSOUND_DLL_NAME<span class="stringliteral">"' that is in the directory: '%s'"</span>, buffer); +00081 +00082 createSoundDriver = (<a class="code" href="a05381.html#a13">ISDRV_CREATE_PROC</a>) GetProcAddress (hInst, IDRV_CREATE_PROC_NAME); +00083 <span class="keywordflow">if</span> (createSoundDriver == NULL) +00084 { +00085 <a class="code" href="a04199.html#a1">nlinfo</a>( <span class="stringliteral">"Error: %u"</span>, GetLastError() ); +00086 <span class="keywordflow">throw</span> ESoundDriverCorrupted(); +00087 } +00088 +00089 versionDriver = (<a class="code" href="a05381.html#a15">ISDRV_VERSION_PROC</a>) GetProcAddress (hInst, IDRV_VERSION_PROC_NAME); +00090 <span class="keywordflow">if</span> (versionDriver != NULL) +00091 { +00092 <span class="keywordflow">if</span> (versionDriver()<ISoundDriver::InterfaceVersion) +00093 <span class="keywordflow">throw</span> ESoundDriverOldVersion(); +00094 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (versionDriver()>ISoundDriver::InterfaceVersion) +00095 <span class="keywordflow">throw</span> ESoundDriverUnknownVersion(); +00096 } +00097 +00098 <span class="preprocessor">#elif defined (NL_OS_UNIX)</span> +00099 <span class="preprocessor"></span> +00100 <span class="comment">// Unix code</span> +00101 <span class="keywordtype">void</span> *handle = dlopen(NLSOUND_DLL_NAME, RTLD_NOW); +00102 +00103 <span class="keywordflow">if</span> (handle == NULL) +00104 { +00105 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"when loading dynamic library '%s': %s"</span>, NLSOUND_DLL_NAME, dlerror()); +00106 <span class="keywordflow">throw</span> ESoundDriverNotFound(); +00107 } +00108 +00109 <span class="comment">/* Not ANSI. Might produce a warning */</span> +00110 createSoundDriver = (<a class="code" href="a05381.html#a13">ISDRV_CREATE_PROC</a>) dlsym (handle, IDRV_CREATE_PROC_NAME); +00111 <span class="keywordflow">if</span> (createSoundDriver == NULL) +00112 { +00113 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"when getting function in dynamic library '%s': %s"</span>, NLSOUND_DLL_NAME, dlerror()); +00114 <span class="keywordflow">throw</span> ESoundDriverCorrupted(); +00115 } +00116 +00117 versionDriver = (<a class="code" href="a05381.html#a15">ISDRV_VERSION_PROC</a>) dlsym (handle, IDRV_VERSION_PROC_NAME); +00118 <span class="keywordflow">if</span> (versionDriver != NULL) +00119 { +00120 <span class="keywordflow">if</span> (versionDriver()<ISoundDriver::InterfaceVersion) +00121 <span class="keywordflow">throw</span> ESoundDriverOldVersion(); +00122 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (versionDriver()>ISoundDriver::InterfaceVersion) +00123 <span class="keywordflow">throw</span> ESoundDriverUnknownVersion(); +00124 } +00125 +00126 <span class="preprocessor">#else // NL_OS_UNIX</span> +00127 <span class="preprocessor"></span><span class="preprocessor">#error "Dynamic DLL loading not implemented!"</span> +00128 <span class="preprocessor"></span><span class="preprocessor">#endif // NL_OS_UNIX</span> +00129 <span class="preprocessor"></span> +00130 <a class="code" href="a03419.html#NLSOUND_1_1ISoundDriverb0">ISoundDriver</a> *ret = createSoundDriver(useEax, stringMapper); +00131 <span class="keywordflow">if</span> ( ret == NULL ) +00132 { +00133 <span class="keywordflow">throw</span> ESoundDriverCantCreateDriver(); +00134 } +00135 <span class="keywordflow">return</span> ret; +00136 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALb3" doxytag="NLSOUND::CSoundDriverAL::createItem" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> ALuint NLSOUND::CSoundDriverAL::createItem </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a05381.html#a11">TGenFunctionAL</a> </td> + <td class="mdname" nowrap> <em>algenfunc</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a05381.html#a12">TTestFunctionAL</a> </td> + <td class="mdname" nowrap> <em>altestfunc</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>std::vector< ALuint > & </td> + <td class="mdname" nowrap> <em>names</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> & </td> + <td class="mdname" nowrap> <em>index</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>allocrate</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [protected]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Create a sound buffer or a sound source. +<p> + +<p> +Definition at line <a class="el" href="a06418.html#l00289">289</a> of file <a class="el" href="a06418.html">sound_driver_al.cpp</a>. +<p> +References <a class="el" href="a06418.html#l00215">allocateNewItems()</a>, <a class="el" href="a06418.html#l00323">compactAliveNames()</a>, <a class="el" href="a06418.html#l00240">generateItems()</a>, <a class="el" href="a05646.html#l00225">index</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06419.html#l00055">NLSOUND::TGenFunctionAL</a>, <a class="el" href="a06419.html#l00059">NLSOUND::TTestFunctionAL</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a06418.html#l00264">createBuffer()</a>, and <a class="el" href="a06418.html#l00274">createSource()</a>. +<p> +<div class="fragment"><pre>00291 { +00292 NL_ALLOC_CONTEXT(NLSOUND_CSoundDriverAL); +00293 <a class="code" href="a04199.html#a6">nlassert</a>( index <= names.size() ); +00294 <span class="keywordflow">if</span> ( <a class="code" href="a04223.html#a566">index</a> == names.size() ) +00295 { +00296 <span class="comment">// Generate new items</span> +00297 <a class="code" href="a04558.html#a15">uint</a> nbalive = <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALb2">compactAliveNames</a>( names, altestfunc ); +00298 <span class="keywordflow">if</span> ( nbalive == names.size() ) +00299 { +00300 <span class="comment">// Extend vector of names</span> +00301 <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALb0">allocateNewItems</a>( algenfunc, altestfunc, names, index, allocrate ); +00302 } +00303 <span class="keywordflow">else</span> +00304 { +00305 <span class="comment">// Take the room of the deleted names</span> +00306 <a class="code" href="a04199.html#a6">nlassert</a>( nbalive < names.size() ); +00307 <a class="code" href="a04223.html#a566">index</a> = nbalive; +00308 <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALb6">generateItems</a>( algenfunc, altestfunc, names.size() - nbalive, &(names[nbalive]) ); +00309 } +00310 } +00311 +00312 <span class="comment">// Return the name of the item</span> +00313 <a class="code" href="a04199.html#a6">nlassert</a>( index < names.size() ); +00314 ALuint itemname = names[<a class="code" href="a04223.html#a566">index</a>]; +00315 <a class="code" href="a04223.html#a566">index</a>++; +00316 <span class="keywordflow">return</span> itemname; +00317 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALa4" doxytag="NLSOUND::CSoundDriverAL::createListener" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03861.html">IListener</a> * NLSOUND::CSoundDriverAL::createListener </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Create the listener instance. +<p> + +<p> +Implements <a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera3">NLSOUND::ISoundDriver</a>. +<p> +Definition at line <a class="el" href="a06418.html#l00389">389</a> of file <a class="el" href="a06418.html">sound_driver_al.cpp</a>. +<p> +References <a class="el" href="a05622.html#l00290">nlassert</a>. +<p> +<div class="fragment"><pre>00390 { +00391 NL_ALLOC_CONTEXT(NLSOUND_CSoundDriverAL); +00392 <a class="code" href="a04199.html#a6">nlassert</a>( CListenerAL::instance() == NULL ); +00393 <span class="keywordflow">return</span> <span class="keyword">new</span> CListenerAL(); +00394 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALa5" doxytag="NLSOUND::CSoundDriverAL::createSource" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03428.html">ISource</a> * NLSOUND::CSoundDriverAL::createSource </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Create a source. +<p> + +<p> +Implements <a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera4">NLSOUND::ISoundDriver</a>. +<p> +Definition at line <a class="el" href="a06418.html#l00274">274</a> of file <a class="el" href="a06418.html">sound_driver_al.cpp</a>. +<p> +References <a class="el" href="a06419.html#l00189">_NbExpSources</a>, <a class="el" href="a06419.html#l00192">_RolloffFactor</a>, <a class="el" href="a06418.html#l00289">createItem()</a>, <a class="el" href="a06418.html#l00081">ROLLOFF_FACTOR_DEFAULT</a>, <a class="el" href="a06418.html#l00079">SOURCE_ALLOC_RATE</a>, and <a class="el" href="a06426.html#l00150">NLSOUND::CSourceAL::sourceName()</a>. +<p> +<div class="fragment"><pre>00275 { +00276 NL_ALLOC_CONTEXT(NLSOUND_CSoundDriverAL); +00277 CSourceAL *sourceal = <span class="keyword">new</span> CSourceAL( <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALb3">createItem</a>( alGenSources, alIsSource, _Sources, _NbExpSources, SOURCE_ALLOC_RATE ) ); +00278 <span class="keywordflow">if</span> ( <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALr3">_RolloffFactor</a> != <a class="code" href="a04995.html#a4">ROLLOFF_FACTOR_DEFAULT</a> ) +00279 { +00280 alSourcef( sourceal->sourceName(), AL_ROLLOFF_FACTOR, <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALr3">_RolloffFactor</a> ); +00281 } +00282 <span class="keywordflow">return</span> sourceal; +00283 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALb5" doxytag="NLSOUND::CSoundDriverAL::deleteItem" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLSOUND::CSoundDriverAL::deleteItem </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">ALuint </td> + <td class="mdname" nowrap> <em>name</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a05381.html#a11">TGenFunctionAL</a> </td> + <td class="mdname" nowrap> <em>aldeletefunc</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>std::vector< ALuint > & </td> + <td class="mdname" nowrap> <em>names</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [protected]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Delete a buffer or a source. +<p> + +<p> +Definition at line <a class="el" href="a06418.html#l00372">372</a> of file <a class="el" href="a06418.html">sound_driver_al.cpp</a>. +<p> +References <a class="el" href="a06419.html#l00074">TestALError</a>, and <a class="el" href="a06419.html#l00055">NLSOUND::TGenFunctionAL</a>. +<p> +Referenced by <a class="el" href="a06418.html#l00344">removeBuffer()</a>, and <a class="el" href="a06418.html#l00358">removeSource()</a>. +<p> +<div class="fragment"><pre>00373 { +00374 vector<ALuint>::iterator ibn = find( names.begin(), names.end(), name ); +00375 <span class="keywordflow">if</span> ( ibn == names.end() ) +00376 { +00377 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00378 } +00379 aldeletefunc( 1, &*ibn ); +00380 *ibn = AL_NONE; +00381 <a class="code" href="a04996.html#a0">TestALError</a>(); +00382 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00383 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALa7" doxytag="NLSOUND::CSoundDriverAL::displayBench" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> virtual void NLSOUND::CSoundDriverAL::displayBench </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02813.html">NLMISC::CLog</a> * </td> + <td class="mdname1" valign="top" nowrap> <em>log</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Implements <a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera5">NLSOUND::ISoundDriver</a>. +<p> +Definition at line <a class="el" href="a06419.html#l00122">122</a> of file <a class="el" href="a06419.html">sound_driver_al.h</a>. +<p> +<div class="fragment"><pre>00122 { <span class="comment">/* TODO */</span> } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALa8" doxytag="NLSOUND::CSoundDriverAL::endBench" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> virtual void NLSOUND::CSoundDriverAL::endBench </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Implements <a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera6">NLSOUND::ISoundDriver</a>. +<p> +Definition at line <a class="el" href="a06419.html#l00121">121</a> of file <a class="el" href="a06419.html">sound_driver_al.h</a>. +<p> +<div class="fragment"><pre>00121 { <span class="comment">/* todo */</span> } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALb6" doxytag="NLSOUND::CSoundDriverAL::generateItems" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLSOUND::CSoundDriverAL::generateItems </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a05381.html#a11">TGenFunctionAL</a> </td> + <td class="mdname" nowrap> <em>algenfunc</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a05381.html#a12">TTestFunctionAL</a> </td> + <td class="mdname" nowrap> <em>altestfunc</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>nb</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>ALuint * </td> + <td class="mdname" nowrap> <em>array</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [protected]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Generate nb buffers. +<p> + +<p> +Definition at line <a class="el" href="a06418.html#l00240">240</a> of file <a class="el" href="a06418.html">sound_driver_al.cpp</a>. +<p> +References <a class="el" href="a06419.html#l00055">NLSOUND::TGenFunctionAL</a>, <a class="el" href="a06418.html#l00227">NLSOUND::ThrowGenException()</a>, <a class="el" href="a06419.html#l00059">NLSOUND::TTestFunctionAL</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a06418.html#l00215">allocateNewItems()</a>, and <a class="el" href="a06418.html#l00289">createItem()</a>. +<p> +<div class="fragment"><pre>00241 { +00242 algenfunc( nb, array ); +00243 +00244 <span class="comment">// Error handling</span> +00245 <span class="keywordflow">if</span> ( alGetError() != AL_NO_ERROR ) +00246 { +00247 <a class="code" href="a05381.html#a78">ThrowGenException</a>( algenfunc ); +00248 } +00249 +00250 <span class="comment">// Check buffers</span> +00251 <a class="code" href="a04558.html#a15">uint</a> i; +00252 <span class="keywordflow">for</span> ( i=0; i!=nb; i++ ) +00253 { +00254 <span class="keywordflow">if</span> ( ! altestfunc( array[i] ) ) +00255 { +00256 <a class="code" href="a05381.html#a78">ThrowGenException</a>( algenfunc ); +00257 } +00258 } +00259 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALa9" doxytag="NLSOUND::CSoundDriverAL::init" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLSOUND::CSoundDriverAL::init </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Initialization. +<p> + +<p> +Definition at line <a class="el" href="a06418.html#l00162">162</a> of file <a class="el" href="a06418.html">sound_driver_al.cpp</a>. +<p> +References <a class="el" href="a06419.html#l00180">_Buffers</a>, <a class="el" href="a06419.html#l00186">_NbExpBuffers</a>, <a class="el" href="a06419.html#l00189">_NbExpSources</a>, <a class="el" href="a06418.html#l00215">allocateNewItems()</a>, <a class="el" href="a06418.html#l00076">INITIAL_BUFFERS</a>, <a class="el" href="a06418.html#l00077">INITIAL_SOURCES</a>, <a class="el" href="a05622.html#l00111">nlinfo</a>, and <a class="el" href="a06419.html#l00074">TestALError</a>. +<p> +<div class="fragment"><pre>00163 { +00164 <span class="comment">// OpenAL initialization</span> +00165 alutInit( NULL, NULL ); +00166 +00167 <span class="comment">// Display version information</span> +00168 <span class="keyword">const</span> ALubyte *alversion, *alrenderer, *alvendor, *alext; +00169 alversion = alGetString( AL_VERSION ); +00170 alrenderer = alGetString( AL_RENDERER ); +00171 alvendor = alGetString( AL_VENDOR ); +00172 alext = alGetString( AL_EXTENSIONS ); +00173 <a class="code" href="a04996.html#a0">TestALError</a>(); +00174 <a class="code" href="a04199.html#a1">nlinfo</a>( <span class="stringliteral">"Loading OpenAL lib: %s, %s, %s"</span>, alversion, alrenderer, alvendor ); +00175 <a class="code" href="a04199.html#a1">nlinfo</a>( <span class="stringliteral">"Listing extensions: %s"</span>, alext ); +00176 +00177 <span class="preprocessor">#if EAX_AVAILABLE == 1</span> +00178 <span class="preprocessor"></span> <span class="comment">// Set EAX environment if EAX is available</span> +00179 <span class="keywordflow">if</span> ( alIsExtensionPresent((ALubyte *)<span class="stringliteral">"EAX"</span>) == AL_TRUE ) <span class="comment">// or EAX2.0</span> +00180 { +00181 <a class="code" href="a04199.html#a1">nlinfo</a>( <span class="stringliteral">"Initializing EAX"</span> ); +00182 EAXSetProp = (EAXSet)alGetProcAddress((ALubyte*)<span class="stringliteral">"EAXSet"</span>); +00183 EAXGetProp = (EAXGet)alGetProcAddress((ALubyte*)<span class="stringliteral">"EAXGet"</span>); +00184 <span class="keywordflow">if</span> ( EAXSetProp != NULL ) +00185 { +00186 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> ulEAXVal; +00187 <span class="keywordtype">long</span> lGlobalReverb; +00188 lGlobalReverb = 0; +00189 EAXSetProp( &DSPROPSETID_EAX_ListenerProperties, DSPROPERTY_EAXLISTENER_ROOM, 0, &lGlobalReverb, <span class="keyword">sizeof</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>) ); +00190 ulEAXVal = EAX_ENVIRONMENT_GENERIC; +00191 EAXSetProp( &DSPROPSETID_EAX_ListenerProperties, DSPROPERTY_EAXLISTENER_ENVIRONMENT, 0, &ulEAXVal, <span class="keyword">sizeof</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>) ); +00192 } +00193 } +00194 <span class="keywordflow">else</span> +00195 <span class="preprocessor">#endif</span> +00196 <span class="preprocessor"></span> { +00197 <a class="code" href="a04199.html#a1">nlinfo</a>( <span class="stringliteral">"EAX not available"</span> ); +00198 } +00199 +00200 <span class="comment">// Choose the I3DL2 model (same as DirectSound3D)</span> +00201 alDistanceModel( AL_INVERSE_DISTANCE_CLAMPED ); +00202 <a class="code" href="a04996.html#a0">TestALError</a>(); +00203 +00204 <span class="comment">// Initial buffers and sources allocation</span> +00205 <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALb0">allocateNewItems</a>( alGenBuffers, alIsBuffer, _Buffers, _NbExpBuffers, INITIAL_BUFFERS ); +00206 <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALb0">allocateNewItems</a>( alGenSources, alIsSource, _Sources, _NbExpSources, INITIAL_SOURCES ); +00207 +00208 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00209 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALe1" doxytag="NLSOUND::CSoundDriverAL::instance" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03418.html">CSoundDriverAL</a>* NLSOUND::CSoundDriverAL::instance </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, static]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the instance of the singleton. +<p> + +<p> +Definition at line <a class="el" href="a06419.html#l00099">99</a> of file <a class="el" href="a06419.html">sound_driver_al.h</a>. +<p> +<div class="fragment"><pre>00099 { <span class="keywordflow">return</span> <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALv0">_Instance</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALa10" doxytag="NLSOUND::CSoundDriverAL::loadWavFile" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLSOUND::CSoundDriverAL::loadWavFile </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02298.html">IBuffer</a> * </td> + <td class="mdname" nowrap> <em>destbuffer</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const char * </td> + <td class="mdname" nowrap> <em>filename</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Temp. +<p> + +<p> +Definition at line <a class="el" href="a06418.html#l00431">431</a> of file <a class="el" href="a06418.html">sound_driver_al.cpp</a>. +<p> +References <a class="el" href="a06418.html#l00415">NLSOUND::ALtoNLSoundFormat()</a>, <a class="el" href="a05646.html#l01013">data</a>, <a class="el" href="a02298.html#NLSOUND_1_1IBuffera0">NLSOUND::IBuffer::fillBuffer()</a>, <a class="el" href="a05646.html#l01016">format</a>, <a class="el" href="a02298.html#NLSOUND_1_1IBuffera10">NLSOUND::IBuffer::setFormat()</a>, and <a class="el" href="a05646.html#l00645">size</a>. +<p> +<div class="fragment"><pre>00432 { +00433 <span class="comment">// Currently, the OpenAL UT headers are different between Windows and Linux versions</span> +00434 <span class="preprocessor">#ifdef NL_OS_WINDOWS</span> +00435 <span class="preprocessor"></span> ALsizei <a class="code" href="a04223.html#a587">size</a>,freq; +00436 ALenum <a class="code" href="a04223.html#a641">format</a>; +00437 ALvoid *<a class="code" href="a04223.html#a637">data</a>; +00438 ALboolean loop; +00439 alutLoadWAVFile( const_cast<char*>(filename), &format, &data, &size, &freq, &loop ); <span class="comment">// last arg in some al.h</span> +00440 <span class="preprocessor">#else</span> +00441 <span class="preprocessor"></span> ALsizei bits; +00442 ALsizei <a class="code" href="a04223.html#a587">size</a>,freq; +00443 ALsizei <a class="code" href="a04223.html#a641">format</a>; +00444 ALvoid *<a class="code" href="a04223.html#a637">data</a>; +00445 alutLoadWAV( const_cast<char*>(filename), &data, &format, &size, &bits, &freq ); +00446 <span class="preprocessor">#endif</span> +00447 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( <a class="code" href="a04223.html#a637">data</a> == NULL ) +00448 { +00449 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00450 } +00451 destbuffer->setFormat( <a class="code" href="a05381.html#a79">ALtoNLSoundFormat</a>(format), freq ); +00452 destbuffer->fillBuffer( data, size ); +00453 +00454 string ext = CFile::getFilenameWithoutExtension(filename); +00455 <span class="comment">// TODO static_cast<CBufferAL*>(destbuffer)->setName(ext);</span> +00456 +00457 <span class="preprocessor">#ifdef NL_OS_WINDOWS</span> +00458 <span class="preprocessor"></span> alutUnloadWAV(format,data,size,freq); <span class="comment">// Where is it on Linux ?!?</span> +00459 <span class="preprocessor">#endif</span> +00460 <span class="preprocessor"></span> <span class="keywordflow">return</span> <span class="keyword">true</span>; +00461 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALa11" doxytag="NLSOUND::CSoundDriverAL::readRawBuffer" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> virtual bool NLSOUND::CSoundDriverAL::readRawBuffer </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02298.html">IBuffer</a> * </td> + <td class="mdname" nowrap> <em>destbuffer</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const std::string & </td> + <td class="mdname" nowrap> <em>name</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> * </td> + <td class="mdname" nowrap> <em>rawData</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>dataSize</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a05381.html#a80">TSampleFormat</a> </td> + <td class="mdname" nowrap> <em>format</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> </td> + <td class="mdname" nowrap> <em>frequency</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inline, virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Implements <a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera7">NLSOUND::ISoundDriver</a>. +<p> +Definition at line <a class="el" href="a06419.html#l00118">118</a> of file <a class="el" href="a06419.html">sound_driver_al.h</a>. +<p> +References <a class="el" href="a05646.html#l01016">format</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a05981.html#l00096">uint8</a>. +<p> +<div class="fragment"><pre>00118 { <span class="comment">/* todo */</span> <span class="keywordflow">return</span> <span class="keyword">false</span>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALa12" doxytag="NLSOUND::CSoundDriverAL::readWavBuffer" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> virtual bool NLSOUND::CSoundDriverAL::readWavBuffer </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02298.html">IBuffer</a> * </td> + <td class="mdname" nowrap> <em>destbuffer</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const std::string & </td> + <td class="mdname" nowrap> <em>name</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> * </td> + <td class="mdname" nowrap> <em>wavData</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>dataSize</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inline, virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Temp. +<p> + +<p> +Implements <a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera8">NLSOUND::ISoundDriver</a>. +<p> +Definition at line <a class="el" href="a06419.html#l00116">116</a> of file <a class="el" href="a06419.html">sound_driver_al.h</a>. +<p> +References <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00096">uint8</a>. +<p> +<div class="fragment"><pre>00116 { <span class="comment">/* todo*/</span> <span class="keywordflow">return</span> <span class="keyword">false</span>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALb7" doxytag="NLSOUND::CSoundDriverAL::removeBuffer" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLSOUND::CSoundDriverAL::removeBuffer </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02298.html">IBuffer</a> * </td> + <td class="mdname1" valign="top" nowrap> <em>buffer</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [protected, virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Remove a buffer. +<p> + +<p> +Implements <a class="el" href="a03419.html#NLSOUND_1_1ISoundDriverb1">NLSOUND::ISoundDriver</a>. +<p> +Definition at line <a class="el" href="a06418.html#l00344">344</a> of file <a class="el" href="a06418.html">sound_driver_al.cpp</a>. +<p> +References <a class="el" href="a06419.html#l00180">_Buffers</a>, <a class="el" href="a05646.html#l00649">buffer</a>, <a class="el" href="a05519.html#l00088">NLSOUND::CBufferAL::bufferName()</a>, <a class="el" href="a06418.html#l00372">deleteItem()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05622.html#l00135">nlwarning</a>. +<p> +Referenced by <a class="el" href="a05518.html#l00045">NLSOUND::CBufferAL::~CBufferAL()</a>. +<p> +<div class="fragment"><pre>00345 { +00346 <a class="code" href="a04199.html#a6">nlassert</a>( buffer != NULL ); +00347 CBufferAL *bufferAL = dynamic_cast<CBufferAL*>(<a class="code" href="a04223.html#a589">buffer</a>); +00348 <span class="keywordflow">if</span> ( ! <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALb5">deleteItem</a>( bufferAL->bufferName(), alDeleteBuffers, <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALr0">_Buffers</a> ) ) +00349 { +00350 <a class="code" href="a04199.html#a2">nlwarning</a>( <span class="stringliteral">"Deleting buffer: name not found"</span> ); +00351 } +00352 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALb8" doxytag="NLSOUND::CSoundDriverAL::removeSource" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLSOUND::CSoundDriverAL::removeSource </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03428.html">ISource</a> * </td> + <td class="mdname1" valign="top" nowrap> <em>source</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [protected, virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Remove a source. +<p> + +<p> +Implements <a class="el" href="a03419.html#NLSOUND_1_1ISoundDriverb2">NLSOUND::ISoundDriver</a>. +<p> +Definition at line <a class="el" href="a06418.html#l00358">358</a> of file <a class="el" href="a06418.html">sound_driver_al.cpp</a>. +<p> +References <a class="el" href="a06418.html#l00372">deleteItem()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, and <a class="el" href="a06426.html#l00150">NLSOUND::CSourceAL::sourceName()</a>. +<p> +Referenced by <a class="el" href="a06425.html#l00054">NLSOUND::CSourceAL::~CSourceAL()</a>. +<p> +<div class="fragment"><pre>00359 { +00360 <a class="code" href="a04199.html#a6">nlassert</a>( source != NULL ); +00361 CSourceAL *sourceAL = dynamic_cast<CSourceAL*>(source); +00362 <span class="keywordflow">if</span> ( ! <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALb5">deleteItem</a>( sourceAL->sourceName(), alDeleteSources, <a class="code" href="a03418.html#NLSOUND_1_1CSoundDriverALr4">_Sources</a> ) ) +00363 { +00364 <a class="code" href="a04199.html#a2">nlwarning</a>( <span class="stringliteral">"Deleting source: name not found"</span> ); +00365 } +00366 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALa13" doxytag="NLSOUND::CSoundDriverAL::startBench" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> virtual void NLSOUND::CSoundDriverAL::startBench </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Implements <a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera9">NLSOUND::ISoundDriver</a>. +<p> +Definition at line <a class="el" href="a06419.html#l00120">120</a> of file <a class="el" href="a06419.html">sound_driver_al.h</a>. +<p> +<div class="fragment"><pre>00120 { <span class="comment">/* todo */</span> } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALa14" doxytag="NLSOUND::CSoundDriverAL::writeProfile" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> virtual void NLSOUND::CSoundDriverAL::writeProfile </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">std::ostream & </td> + <td class="mdname1" valign="top" nowrap> <em>out</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Write information about the driver to the output stream. +<p> + +<p> +Implements <a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera10">NLSOUND::ISoundDriver</a>. +<p> +Definition at line <a class="el" href="a06419.html#l00135">135</a> of file <a class="el" href="a06419.html">sound_driver_al.h</a>. +<p> +<div class="fragment"><pre>00135 {} +</pre></div> </td> + </tr> +</table> +<hr><h2>Field Documentation</h2> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALr0" doxytag="NLSOUND::CSoundDriverAL::_Buffers" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> std::vector<ALuint> <a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALr0">NLSOUND::CSoundDriverAL::_Buffers</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06419.html#l00180">180</a> of file <a class="el" href="a06419.html">sound_driver_al.h</a>. +<p> +Referenced by <a class="el" href="a06418.html#l00264">createBuffer()</a>, <a class="el" href="a06418.html#l00162">init()</a>, <a class="el" href="a06418.html#l00344">removeBuffer()</a>, and <a class="el" href="a06418.html#l00146">~CSoundDriverAL()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALv0" doxytag="NLSOUND::CSoundDriverAL::_Instance" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03418.html">CSoundDriverAL</a> * <a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALv0">NLSOUND::CSoundDriverAL::_Instance</a> = NULL<code> [static, private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06418.html#l00123">123</a> of file <a class="el" href="a06418.html">sound_driver_al.cpp</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALr1" doxytag="NLSOUND::CSoundDriverAL::_NbExpBuffers" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALr1">NLSOUND::CSoundDriverAL::_NbExpBuffers</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06419.html#l00186">186</a> of file <a class="el" href="a06419.html">sound_driver_al.h</a>. +<p> +Referenced by <a class="el" href="a06418.html#l00264">createBuffer()</a>, and <a class="el" href="a06418.html#l00162">init()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALr2" doxytag="NLSOUND::CSoundDriverAL::_NbExpSources" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALr2">NLSOUND::CSoundDriverAL::_NbExpSources</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06419.html#l00189">189</a> of file <a class="el" href="a06419.html">sound_driver_al.h</a>. +<p> +Referenced by <a class="el" href="a06418.html#l00274">createSource()</a>, and <a class="el" href="a06418.html#l00162">init()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALr3" doxytag="NLSOUND::CSoundDriverAL::_RolloffFactor" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> float <a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALr3">NLSOUND::CSoundDriverAL::_RolloffFactor</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06419.html#l00192">192</a> of file <a class="el" href="a06419.html">sound_driver_al.h</a>. +<p> +Referenced by <a class="el" href="a06418.html#l00400">applyRolloffFactor()</a>, and <a class="el" href="a06418.html#l00274">createSource()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSoundDriverALr4" doxytag="NLSOUND::CSoundDriverAL::_Sources" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> std::vector<ALuint> <a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALr4">NLSOUND::CSoundDriverAL::_Sources</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06419.html#l00183">183</a> of file <a class="el" href="a06419.html">sound_driver_al.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1ISoundDrivers0" doxytag="NLSOUND::CSoundDriverAL::InterfaceVersion" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivers0">NLSOUND::ISoundDriver::InterfaceVersion</a> = 0x08<code> [static, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Version of the driver interface. To increment when the interface change. +<p> + +<p> +Definition at line <a class="el" href="a06416.html#l00048">48</a> of file <a class="el" href="a06416.html">sound_driver.cpp</a>. </td> + </tr> +</table> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="a06419.html">sound_driver_al.h</a><li><a class="el" href="a06418.html">sound_driver_al.cpp</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 14:43:56 2004 for NeL by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border=0 > +</a>1.3.6 </small></address> +</body> +</html> |