aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03420.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/doxygen/nel/a03420.html')
-rw-r--r--docs/doxygen/nel/a03420.html2236
1 files changed, 2236 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03420.html b/docs/doxygen/nel/a03420.html
new file mode 100644
index 00000000..b99d7d4b
--- /dev/null
+++ b/docs/doxygen/nel/a03420.html
@@ -0,0 +1,2236 @@
+<!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::CSoundDriverDSound 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&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a> | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
+<h1>NLSOUND::CSoundDriverDSound Class Reference</h1><code>#include &lt;<a class="el" href="a06421.html">sound_driver_dsound.h</a>&gt;</code>
+<p>
+<p>Inheritance diagram for NLSOUND::CSoundDriverDSound:
+<p><center><img src="a03420.png" usemap="#NLSOUND::CSoundDriverDSound_map" border="0" alt=""></center>
+<map name="NLSOUND::CSoundDriverDSound_map">
+<area href="a03419.html" alt="NLSOUND::ISoundDriver" shape="rect" coords="0,0,204,24">
+</map>
+<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>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda0">commit3DChanges</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Commit all the changes made to 3D settings of listener and sources. <a href="#NLSOUND_1_1CSoundDriverDSounda0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda1">countHw2DBuffers</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Count the number of available hardware streaming 2D buffers. <a href="#NLSOUND_1_1CSoundDriverDSounda1"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda2">countHw3DBuffers</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Count the number of available hardware streaming 3D buffers. <a href="#NLSOUND_1_1CSoundDriverDSounda2"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda3">countMaxSources</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the maximum number of sources that can created. <a href="#NLSOUND_1_1CSoundDriverDSounda3"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda4">countPlayingSources</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Count the number of sources that are actually playing. <a href="#NLSOUND_1_1CSoundDriverDSounda4"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a02298.html">IBuffer</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda5">createBuffer</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a sound buffer. <a href="#NLSOUND_1_1CSoundDriverDSounda5"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a03861.html">IListener</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda6">createListener</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create the listener instance. <a href="#NLSOUND_1_1CSoundDriverDSounda6"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a03428.html">ISource</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda7">createSource</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a source. <a href="#NLSOUND_1_1CSoundDriverDSounda7"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda8">CSoundDriverDSound</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. <a href="#NLSOUND_1_1CSoundDriverDSounda8"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda9">getGain</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the gain. <a href="#NLSOUND_1_1CSoundDriverDSounda9"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>IStringMapperProvider *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda10">getStringMapper</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the string mapper. <a href="#NLSOUND_1_1CSoundDriverDSounda10"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda11">init</a> (HWND wnd, bool useEax, IStringMapperProvider *stringMapper)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialization. <a href="#NLSOUND_1_1CSoundDriverDSounda11"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda12">readRawBuffer</a> (<a class="el" href="a02298.html">IBuffer</a> *destbuffer, const std::string &amp;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&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda13">readWavBuffer</a> (<a class="el" href="a02298.html">IBuffer</a> *destbuffer, const std::string &amp;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">&nbsp;</td><td class="mdescRight">Load a wave file in to the buffer. <a href="#NLSOUND_1_1CSoundDriverDSounda13"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda14">setGain</a> (float gain)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda15">update</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Update all the driver and its sources. To be called only by the timer callback. <a href="#NLSOUND_1_1CSoundDriverDSounda15"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda16">writeProfile</a> (std::ostream &amp;out)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Write information about the driver to the output stream. <a href="#NLSOUND_1_1CSoundDriverDSounda16"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda17">~CSoundDriverDSound</a> ()</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> *&nbsp;</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="a03420.html">CSoundDriverDSound</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounde1">instance</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the instance of the singleton. <a href="#NLSOUND_1_1CSoundDriverDSounde1"></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>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivers0">InterfaceVersion</a> = 0x08</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</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>Private Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>friend&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundd0">CBufferDSound::~CBufferDSound</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>friend&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundd1">CSourceDSound::~CSourceDSound</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundd2">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&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundd3">endBench</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundd4">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">&nbsp;</td><td class="mdescRight">Remove a buffer (should be called by the friend destructor of the buffer class). <a href="#NLSOUND_1_1CSoundDriverDSoundd4"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundd5">removeSource</a> (<a class="el" href="a03428.html">ISource</a> *source)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove a source (should be called by the friend destructor of the source class). <a href="#NLSOUND_1_1CSoundDriverDSoundd5"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundd6">startBench</a> ()</td></tr>
+
+<tr><td colspan=2><br><h2>Static Private Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void CALLBACK&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundh0">TimerCallback</a> (UINT uID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2)</td></tr>
+
+<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>DSCAPS&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr0">_Caps</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>LPDIRECTSOUND8&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr1">_DirectSound</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>LPDIRECTSOUNDBUFFER&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr2">_PrimaryBuffer</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr3">_SourceCount</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::set&lt; <a class="el" href="a03430.html">CSourceDSound</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr4">_Sources</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>IStringMapperProvider *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr5">_StringMapper</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The string mapper provided by client code. <a href="#NLSOUND_1_1CSoundDriverDSoundr5"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>UINT&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr6">_TimerID</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr7">_TimerResolution</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr8">_UseEAX</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The EAX support is requested and accepted (ie, there is enougth hardware 3D buffer). <a href="#NLSOUND_1_1CSoundDriverDSoundr8"></a><br><br></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="a03420.html">CSoundDriverDSound</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundv0">_Instance</a> = NULL</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundv1">_TimerPeriod</a> = 100</td></tr>
+
+</table>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSounda8" doxytag="NLSOUND::CSoundDriverDSound::CSoundDriverDSound" ></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::CSoundDriverDSound::CSoundDriverDSound </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Constructor.
+<p>
+ </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSounda17" doxytag="NLSOUND::CSoundDriverDSound::~CSoundDriverDSound" ></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::CSoundDriverDSound::~<a class="el" href="a03420.html">CSoundDriverDSound</a> </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06420.html#l00561">561</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06421.html#l00145">_DirectSound</a>, <a class="el" href="a06421.html#l00148">_PrimaryBuffer</a>, <a class="el" href="a06421.html#l00161">_TimerID</a>, <a class="el" href="a06421.html#l00164">_TimerResolution</a>, and <a class="el" href="a05622.html#l00101">nldebug</a>.
+<p>
+<div class="fragment"><pre>00562 {
+00563 <a class="code" href="a04199.html#a0">nldebug</a>(<span class="stringliteral">"Destroying DirectSound driver"</span>);
+00564
+00565 <span class="keywordflow">if</span> (<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr6">_TimerID</a> != NULL)
+00566 {
+00567 timeKillEvent(_TimerID);
+00568 timeEndPeriod(_TimerResolution);
+00569 }
+00570
+00571
+00572 <span class="comment">// Assure that the remaining sources have released all their DSBuffers </span>
+00573 <span class="comment">// before closing down DirectSound</span>
+00574 set&lt;CSourceDSound*&gt;::iterator iter;
+00575
+00576 <span class="keywordflow">for</span> (iter = <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr4">_Sources</a>.begin(); iter != <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr4">_Sources</a>.end(); iter++)
+00577 {
+00578 (*iter)-&gt;release();
+00579 }
+00580
+00581
+00582 <span class="comment">// Assure that the listener has released all resources before closing </span>
+00583 <span class="comment">// down DirectSound</span>
+00584 <span class="keywordflow">if</span> (CListenerDSound::instance() != 0)
+00585 {
+00586 CListenerDSound::instance()-&gt;release();
+00587 }
+00588
+00589
+00590 <span class="keywordflow">if</span> (<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr2">_PrimaryBuffer</a> != NULL)
+00591 {
+00592 <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr2">_PrimaryBuffer</a>-&gt;Release();
+00593 <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr2">_PrimaryBuffer</a> = NULL;
+00594 }
+00595
+00596 <span class="keywordflow">if</span> (<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr1">_DirectSound</a> != NULL)
+00597 {
+00598 <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr1">_DirectSound</a>-&gt;Release();
+00599 <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr1">_DirectSound</a> = NULL;
+00600 }
+00601
+00602 <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundv0">_Instance</a> = 0;
+00603
+00604 <span class="comment">// free the enumerated list</span>
+00605 <span class="keywordflow">if</span> (CDeviceDescription::_List)
+00606 {
+00607 <span class="keyword">delete</span> CDeviceDescription::_List;
+00608 CDeviceDescription::_List = NULL;
+00609 }
+00610 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSoundd0" doxytag="NLSOUND::CSoundDriverDSound::CBufferDSound::~CBufferDSound" ></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::CSoundDriverDSound::CBufferDSound::~<a class="el" href="a02299.html">CBufferDSound</a> </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+ </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSoundd1" doxytag="NLSOUND::CSoundDriverDSound::CSourceDSound::~CSourceDSound" ></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::CSoundDriverDSound::CSourceDSound::~<a class="el" href="a03430.html">CSourceDSound</a> </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+ </td>
+ </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSounda0" doxytag="NLSOUND::CSoundDriverDSound::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"> void NLSOUND::CSoundDriverDSound::commit3DChanges </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </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="a06420.html#l00886">886</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</a>.
+<p>
+References <a class="el" href="a05919.html#l00322">NLSOUND::CListenerDSound::commit3DChanges()</a>, and <a class="el" href="a05919.html#l00125">NLSOUND::CListenerDSound::getPos()</a>.
+<p>
+<div class="fragment"><pre>00887 {
+00888 CListenerDSound* listener = CListenerDSound::instance();
+00889 listener-&gt;commit3DChanges();
+00890
+00891
+00892 <span class="keyword">const</span> CVector &amp;origin = listener-&gt;getPos();
+00893
+00894 set&lt;CSourceDSound*&gt;::iterator iter;
+00895
+00896 <span class="comment">// We handle the volume of the source according to the distance</span>
+00897 <span class="comment">// ourselves. Call updateVolume() to, well..., update the volume</span>
+00898 <span class="comment">// according to, euh ..., the new distance!</span>
+00899 <span class="keywordflow">for</span> (iter = <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr4">_Sources</a>.begin(); iter != <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr4">_Sources</a>.end(); iter++)
+00900 {
+00901 <span class="keywordflow">if</span> ((*iter)-&gt;isPlaying())
+00902 {
+00903 (*iter)-&gt;updateVolume(origin);
+00904 }
+00905 }
+00906 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSounda1" doxytag="NLSOUND::CSoundDriverDSound::countHw2DBuffers" ></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::CSoundDriverDSound::countHw2DBuffers </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Count the number of available hardware streaming 2D buffers.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06420.html#l00779">779</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06421.html#l00145">_DirectSound</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06420.html#l00613">countMaxSources()</a>, <a class="el" href="a06429.html#l00218">NLSOUND::CSourceDSound::init()</a>, and <a class="el" href="a06420.html#l00318">init()</a>.
+<p>
+<div class="fragment"><pre>00780 {
+00781 DSCAPS caps;
+00782 caps.dwSize = <span class="keyword">sizeof</span>(caps);
+00783
+00784 <span class="keywordflow">if</span> (<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr1">_DirectSound</a>-&gt;GetCaps(&amp;caps) != DS_OK)
+00785 {
+00786 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Failed to query the sound device caps"</span>);
+00787 }
+00788
+00789 <span class="keywordflow">return</span> caps.dwFreeHwMixingStreamingBuffers;
+00790 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSounda2" doxytag="NLSOUND::CSoundDriverDSound::countHw3DBuffers" ></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::CSoundDriverDSound::countHw3DBuffers </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Count the number of available hardware streaming 3D buffers.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06420.html#l00764">764</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06421.html#l00145">_DirectSound</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06420.html#l00613">countMaxSources()</a>, <a class="el" href="a06429.html#l00218">NLSOUND::CSourceDSound::init()</a>, and <a class="el" href="a06420.html#l00318">init()</a>.
+<p>
+<div class="fragment"><pre>00765 {
+00766 DSCAPS caps;
+00767 caps.dwSize = <span class="keyword">sizeof</span>(caps);
+00768
+00769 <span class="keywordflow">if</span> (<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr1">_DirectSound</a>-&gt;GetCaps(&amp;caps) != DS_OK)
+00770 {
+00771 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Failed to query the sound device caps"</span>);
+00772 }
+00773
+00774 <span class="keywordflow">return</span> caps.dwFreeHw3DStreamingBuffers;
+00775 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSounda3" doxytag="NLSOUND::CSoundDriverDSound::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"> <a class="el" href="a04558.html#a15">uint</a> NLSOUND::CSoundDriverDSound::countMaxSources </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </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="a06420.html#l00613">613</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06420.html#l00779">countHw2DBuffers()</a>, <a class="el" href="a06420.html#l00764">countHw3DBuffers()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00614 {
+00615 <span class="comment">// Try the hardware 3d buffers first</span>
+00616 <a class="code" href="a04558.html#a15">uint</a> n = <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda2">countHw3DBuffers</a>();
+00617 <span class="keywordflow">if</span> (n &gt; 0)
+00618 {
+00619 <span class="keywordflow">return</span> n;
+00620 }
+00621
+00622 <span class="comment">// If not, try the hardware 2d buffers first</span>
+00623 n = <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda1">countHw2DBuffers</a>();
+00624 <span class="keywordflow">if</span> (n &gt; 0)
+00625 {
+00626 <span class="keywordflow">return</span> n;
+00627 }
+00628
+00629 <span class="comment">// Okay, we'll use 32 software buffers</span>
+00630 <span class="keywordflow">return</span> 32;
+00631 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSounda4" doxytag="NLSOUND::CSoundDriverDSound::countPlayingSources" ></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::CSoundDriverDSound::countPlayingSources </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Count the number of sources that are actually playing.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06420.html#l00911">911</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</a>.
+<p>
+References <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06420.html#l00635">writeProfile()</a>.
+<p>
+<div class="fragment"><pre>00912 {
+00913 <a class="code" href="a04558.html#a15">uint</a> n = 0;
+00914 set&lt;CSourceDSound*&gt;::iterator iter;
+00915
+00916 <span class="keywordflow">for</span> (iter = <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr4">_Sources</a>.begin(); iter != <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr4">_Sources</a>.end(); iter++)
+00917 {
+00918 <span class="keywordflow">if</span> ((*iter)-&gt;isPlaying())
+00919 {
+00920 n++;
+00921 }
+00922 }
+00923
+00924 <span class="keywordflow">return</span> n;
+00925 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSounda5" doxytag="NLSOUND::CSoundDriverDSound::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::CSoundDriverDSound::createBuffer </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </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="a06420.html#l00820">820</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06421.html#l00148">_PrimaryBuffer</a>.
+<p>
+<div class="fragment"><pre>00821 {
+00822 NL_ALLOC_CONTEXT(NLSOUND_CSoundDriverDSound);
+00823 <span class="keywordflow">if</span> (<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr2">_PrimaryBuffer</a> == 0)
+00824 {
+00825 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Corrupt driver"</span>);
+00826 }
+00827
+00828
+00829 <span class="comment">// FIXME: set buffer ID</span>
+00830 <span class="keywordflow">return</span> <span class="keyword">new</span> CBufferDSound();
+00831 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1ISoundDrivere0" doxytag="NLSOUND::CSoundDriverDSound::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">(&nbsp;</td>
+ <td class="md" nowrap valign="top">bool&nbsp;</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> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>stringMapper</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</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>
+ &nbsp;
+ </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, &amp;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()&lt;ISoundDriver::InterfaceVersion)
+00093 <span class="keywordflow">throw</span> ESoundDriverOldVersion();
+00094 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (versionDriver()&gt;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()&lt;ISoundDriver::InterfaceVersion)
+00121 <span class="keywordflow">throw</span> ESoundDriverOldVersion();
+00122 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (versionDriver()&gt;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_1CSoundDriverDSounda6" doxytag="NLSOUND::CSoundDriverDSound::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::CSoundDriverDSound::createListener </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </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="a06420.html#l00794">794</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06421.html#l00148">_PrimaryBuffer</a>, and <a class="el" href="a05622.html#l00135">nlwarning</a>.
+<p>
+<div class="fragment"><pre>00795 {
+00796 NL_ALLOC_CONTEXT(NLSOUND_CSoundDriverDSound);
+00797 LPDIRECTSOUND3DLISTENER8 dsoundListener;
+00798
+00799 <span class="keywordflow">if</span> (CListenerDSound::instance() != NULL)
+00800 {
+00801 <span class="keywordflow">return</span> CListenerDSound::instance();
+00802 }
+00803
+00804 <span class="keywordflow">if</span> (<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr2">_PrimaryBuffer</a> == 0)
+00805 {
+00806 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Corrupt driver"</span>);
+00807 }
+00808
+00809 <span class="keywordflow">if</span> (FAILED(<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr2">_PrimaryBuffer</a>-&gt;QueryInterface(IID_IDirectSound3DListener, (LPVOID *) &amp;dsoundListener)))
+00810 {
+00811 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"The 3D listener interface is not available."</span>);
+00812 <span class="keywordflow">return</span> <span class="keyword">new</span> CListenerDSound(NULL);
+00813 }
+00814
+00815 <span class="keywordflow">return</span> <span class="keyword">new</span> CListenerDSound(dsoundListener);
+00816 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSounda7" doxytag="NLSOUND::CSoundDriverDSound::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::CSoundDriverDSound::createSource </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </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="a06420.html#l00860">860</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06421.html#l00145">_DirectSound</a>, <a class="el" href="a06421.html#l00148">_PrimaryBuffer</a>, <a class="el" href="a06421.html#l00167">_UseEAX</a>, and <a class="el" href="a05646.html#l01124">src</a>.
+<p>
+<div class="fragment"><pre>00861 {
+00862 NL_ALLOC_CONTEXT(NLSOUND_CSoundDriverDSound);
+00863 <span class="keywordflow">if</span> (<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr2">_PrimaryBuffer</a> == 0)
+00864 {
+00865 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Corrupt driver"</span>);
+00866 }
+00867
+00868
+00869 CSourceDSound* <a class="code" href="a04223.html#a652">src</a> = <span class="keyword">new</span> CSourceDSound(0);
+00870 <a class="code" href="a04223.html#a652">src</a>-&gt;init(_DirectSound, _UseEAX);
+00871 <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr4">_Sources</a>.insert(src);
+00872
+00873 <span class="keywordflow">return</span> <a class="code" href="a04223.html#a652">src</a>;
+00874 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSoundd2" doxytag="NLSOUND::CSoundDriverDSound::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"> void NLSOUND::CSoundDriverDSound::displayBench </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02813.html">NLMISC::CLog</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>log</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private, virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </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="a06420.html#l01064">1064</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</a>.
+<p>
+References <a class="el" href="a05787.html#l00288">NLMISC::CHTimer::display()</a>, <a class="el" href="a05787.html#l00375">NLMISC::CHTimer::displayByExecutionPath()</a>, <a class="el" href="a05787.html#l00472">NLMISC::CHTimer::displayHierarchical()</a>, and <a class="el" href="a05787.html#l00556">NLMISC::CHTimer::displayHierarchicalByExecutionPathSorted()</a>.
+<p>
+<div class="fragment"><pre>01065 {
+01066 <a class="code" href="a02640.html#NLMISC_1_1CHTimere8">NLMISC::CHTimer::displayHierarchicalByExecutionPathSorted</a>(log, CHTimer::TotalTime, <span class="keyword">true</span>, 48, 2);
+01067 <a class="code" href="a02640.html#NLMISC_1_1CHTimere6">NLMISC::CHTimer::displayHierarchical</a>(log, <span class="keyword">true</span>, 48, 2);
+01068 <a class="code" href="a02640.html#NLMISC_1_1CHTimere5">NLMISC::CHTimer::displayByExecutionPath</a>(log, CHTimer::TotalTime);
+01069 <a class="code" href="a02640.html#NLMISC_1_1CHTimere4">NLMISC::CHTimer::display</a>(log, CHTimer::TotalTime);
+01070 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSoundd3" doxytag="NLSOUND::CSoundDriverDSound::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"> void NLSOUND::CSoundDriverDSound::endBench </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private, virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </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="a06420.html#l01060">1060</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</a>.
+<p>
+References <a class="el" href="a05787.html#l00271">NLMISC::CHTimer::endBench()</a>.
+<p>
+<div class="fragment"><pre>01061 {
+01062 <a class="code" href="a02640.html#NLMISC_1_1CHTimere10">NLMISC::CHTimer::endBench</a>();
+01063 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSounda9" doxytag="NLSOUND::CSoundDriverDSound::getGain" ></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 NLSOUND::CSoundDriverDSound::getGain </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Get the gain.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06420.html#l00962">962</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06421.html#l00148">_PrimaryBuffer</a>, and <a class="el" href="a05622.html#l00101">nldebug</a>.
+<p>
+<div class="fragment"><pre>00963 {
+00964 <span class="keywordflow">if</span> (<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr2">_PrimaryBuffer</a> != 0)
+00965 {
+00966 <span class="comment">/* convert from hundredths of decibels to linear amplitude */</span>
+00967 LONG volume;
+00968 HRESULT hr = <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr2">_PrimaryBuffer</a>-&gt;GetVolume(&amp;volume);
+00969
+00970 <span class="keywordflow">if</span> (hr != DS_OK)
+00971 {
+00972 <a class="code" href="a04199.html#a0">nldebug</a>(<span class="stringliteral">"Failed to get the volume"</span>);
+00973 <span class="keywordflow">return</span> 1.0;
+00974 }
+00975
+00976 <span class="keywordflow">return</span> (<span class="keywordtype">float</span>) pow(10, (<span class="keywordtype">double</span>) volume / 20.0 / 100.0);
+00977 }
+00978
+00979 <span class="keywordflow">return</span> 1.0;
+00980 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSounda10" doxytag="NLSOUND::CSoundDriverDSound::getStringMapper" ></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"> IStringMapperProvider* NLSOUND::CSoundDriverDSound::getStringMapper </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Return the string mapper.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06421.html#l00112">112</a> of file <a class="el" href="a06421.html">sound_driver_dsound.h</a>.
+<p>
+References <a class="el" href="a06421.html#l00169">_StringMapper</a>.
+<p>
+<div class="fragment"><pre>00112 {<span class="keywordflow">return</span> <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr5">_StringMapper</a>;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSounda11" doxytag="NLSOUND::CSoundDriverDSound::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::CSoundDriverDSound::init </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">HWND&nbsp;</td>
+ <td class="mdname" nowrap> <em>wnd</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>useEax</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>IStringMapperProvider *&nbsp;</td>
+ <td class="mdname" nowrap> <em>stringMapper</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Initialization.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06420.html#l00318">318</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06421.html#l00151">_Caps</a>, <a class="el" href="a06421.html#l00145">_DirectSound</a>, <a class="el" href="a06421.html#l00148">_PrimaryBuffer</a>, <a class="el" href="a06421.html#l00169">_StringMapper</a>, <a class="el" href="a06421.html#l00161">_TimerID</a>, <a class="el" href="a06420.html#l00053">_TimerPeriod</a>, <a class="el" href="a06421.html#l00164">_TimerResolution</a>, <a class="el" href="a06421.html#l00167">_UseEAX</a>, <a class="el" href="a06420.html#l00779">countHw2DBuffers()</a>, <a class="el" href="a06420.html#l00764">countHw3DBuffers()</a>, <a class="el" href="a06420.html#l00309">NLSOUND::CSoundDriverDSoundEnumCallback()</a>, <a class="el" href="a05646.html#l01016">format</a>, <a class="el" href="a05622.html#l00101">nldebug</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a05646.html#l01119">res</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+<div class="fragment"><pre>00319 {
+00320 <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr5">_StringMapper</a> = stringMapper;
+00321 <span class="keywordflow">if</span> (FAILED(DirectSoundEnumerate(CSoundDriverDSoundEnumCallback, <span class="keyword">this</span>)))
+00322 {
+00323 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Failed to enumerate the DirectSound devices"</span>);
+00324 }
+00325
+00326 <span class="comment">// Create a DirectSound object and set the cooperative level.</span>
+00327
+00328 <span class="keywordflow">if</span> (useEax)
+00329 {
+00330 <span class="keywordflow">if</span> (EAXDirectSoundCreate8(NULL, &amp;_DirectSound, NULL) != DS_OK)
+00331 {
+00332 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Failed to create the DirectSound object from EAX proxy funtion"</span>);
+00333 }
+00334 }
+00335 <span class="keywordflow">else</span>
+00336 {
+00337 <span class="keywordflow">if</span> (DirectSoundCreate8(NULL, &amp;_DirectSound, NULL) != DS_OK)
+00338 {
+00339 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Failed to create the DirectSound object"</span>);
+00340 }
+00341 }
+00342
+00343
+00344 <span class="keywordflow">if</span> (<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr1">_DirectSound</a>-&gt;SetCooperativeLevel(wnd, DSSCL_PRIORITY) != DS_OK)
+00345 {
+00346 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Failed to set the cooperative level"</span>);
+00347 }
+00348
+00349
+00350 <span class="comment">// Analyse the capabilities of the sound driver/device</span>
+00351
+00352 <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr0">_Caps</a>.dwSize = <span class="keyword">sizeof</span>(<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr0">_Caps</a>);
+00353
+00354 <span class="keywordflow">if</span> (<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr1">_DirectSound</a>-&gt;GetCaps(&amp;_Caps) != DS_OK)
+00355 {
+00356 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Failed to query the sound device caps"</span>);
+00357 }
+00358
+00359
+00360 <span class="comment">// Create primary buffer </span>
+00361
+00362 DSBUFFERDESC desc;
+00363
+00364 ZeroMemory(&amp;desc, <span class="keyword">sizeof</span>(DSBUFFERDESC));
+00365 desc.dwSize = <span class="keyword">sizeof</span>(DSBUFFERDESC);
+00366
+00367
+00368 <span class="comment">// First, try to allocate a 3D hardware buffer.</span>
+00369 <span class="comment">// If we can't get a 3D hardware buffer, use a 2D hardware buffer.</span>
+00370 <span class="comment">// As last option, use a 2D software buffer.</span>
+00371
+00372 <span class="comment">// check if wa can honor eax request</span>
+00373 <span class="keywordflow">if</span> (<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda2">countHw3DBuffers</a>() &gt; 10)
+00374 {
+00375 <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr8">_UseEAX</a> = useEax;
+00376 }
+00377 <span class="keywordflow">else</span>
+00378 {
+00379 <span class="comment">// not enougth hardware buffer, can't use eax</span>
+00380 <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr8">_UseEAX</a> = <span class="keyword">false</span>;
+00381 }
+00382
+00383 <span class="keywordflow">if</span> (<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda2">countHw3DBuffers</a>() &gt; 0)
+00384 {
+00385 <a class="code" href="a04199.html#a0">nldebug</a>(<span class="stringliteral">"Primary buffer: Allocating 3D buffer in hardware"</span>);
+00386 desc.dwFlags = DSBCAPS_PRIMARYBUFFER | DSBCAPS_LOCHARDWARE | DSBCAPS_CTRL3D | DSBCAPS_CTRLVOLUME;
+00387 }
+00388 <span class="keywordflow">else</span>
+00389 {
+00390 <a class="code" href="a04199.html#a0">nldebug</a>(<span class="stringliteral">"Primary buffer: Allocating 3D buffer in software"</span>);
+00391 desc.dwFlags = DSBCAPS_PRIMARYBUFFER | DSBCAPS_LOCSOFTWARE | DSBCAPS_CTRL3D | DSBCAPS_CTRLVOLUME;
+00392 <span class="comment">// desc.guid3DAlgorithm = DS3DALG_NO_VIRTUALIZATION;</span>
+00393 }
+00394
+00395
+00396
+00397 HRESULT <a class="code" href="a04223.html#a643">res</a> = <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr1">_DirectSound</a>-&gt;CreateSoundBuffer(&amp;desc, &amp;_PrimaryBuffer, NULL);
+00398
+00399 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a643">res</a> != DS_OK &amp;&amp; <a class="code" href="a04223.html#a643">res</a> != DS_NO_VIRTUALIZATION)
+00400 {
+00401
+00402 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"Primary buffer: Failed to create a buffer with 3D capabilities."</span>);
+00403
+00404 ZeroMemory(&amp;desc, <span class="keyword">sizeof</span>(DSBUFFERDESC));
+00405 desc.dwSize = <span class="keyword">sizeof</span>(DSBUFFERDESC);
+00406
+00407 <span class="keywordflow">if</span> (<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda1">countHw2DBuffers</a>() &gt; 0)
+00408 {
+00409 <a class="code" href="a04199.html#a0">nldebug</a>(<span class="stringliteral">"Primary buffer: Allocating 2D buffer in hardware"</span>);
+00410 desc.dwFlags = DSBCAPS_PRIMARYBUFFER | DSBCAPS_LOCHARDWARE | DSBCAPS_CTRLVOLUME;
+00411 }
+00412 <span class="keywordflow">else</span>
+00413 {
+00414 <a class="code" href="a04199.html#a0">nldebug</a>(<span class="stringliteral">"Primary buffer: Allocating 2D buffer in software"</span>);
+00415 desc.dwFlags = DSBCAPS_PRIMARYBUFFER | DSBCAPS_LOCSOFTWARE | DSBCAPS_CTRLVOLUME;
+00416 }
+00417
+00418 <span class="keywordflow">if</span> (<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr1">_DirectSound</a>-&gt;CreateSoundBuffer(&amp;desc, &amp;_PrimaryBuffer, NULL) != DS_OK)
+00419 {
+00420 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Failed to create the primary buffer"</span>);
+00421 }
+00422 }
+00423
+00424
+00425 <span class="comment">// Set the format of the primary buffer</span>
+00426
+00427 WAVEFORMATEX <a class="code" href="a04223.html#a641">format</a>;
+00428
+00429 <a class="code" href="a04223.html#a641">format</a>.cbSize = <span class="keyword">sizeof</span>(WAVEFORMATEX);
+00430
+00431 <span class="comment">// Make sure the sound card accepts the default settings.</span>
+00432 <span class="comment">// For now, only the default settings are accepted. Fallback</span>
+00433 <span class="comment">// strategy will be handled later.</span>
+00434
+00435 <span class="keywordflow">if</span> ((<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr0">_Caps</a>.dwMinSecondarySampleRate &gt; 22050) &amp;&amp; (22050 &gt; <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr0">_Caps</a>.dwMaxSecondarySampleRate)) {
+00436 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Unsupported sample rate range"</span>);
+00437 }
+00438
+00439 <span class="keywordflow">if</span> ((<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr0">_Caps</a>.dwFlags &amp; DSCAPS_PRIMARY16BIT) == 0) {
+00440 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Unsupported sample size [16bits]"</span>);
+00441 }
+00442
+00443 <a class="code" href="a04223.html#a641">format</a>.wBitsPerSample = 16;
+00444 <a class="code" href="a04223.html#a641">format</a>.nChannels = 1;
+00445 <a class="code" href="a04223.html#a641">format</a>.nSamplesPerSec = 22050;
+00446 <a class="code" href="a04223.html#a641">format</a>.nBlockAlign = <a class="code" href="a04223.html#a641">format</a>.nChannels * <a class="code" href="a04223.html#a641">format</a>.wBitsPerSample / 8;
+00447 <a class="code" href="a04223.html#a641">format</a>.nAvgBytesPerSec = <a class="code" href="a04223.html#a641">format</a>.nSamplesPerSec * <a class="code" href="a04223.html#a641">format</a>.nBlockAlign;
+00448 <a class="code" href="a04223.html#a641">format</a>.wFormatTag = WAVE_FORMAT_PCM;
+00449
+00450
+00451 <span class="keywordflow">if</span> (<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr2">_PrimaryBuffer</a>-&gt;SetFormat(&amp;format) != DS_OK)
+00452 {
+00453 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Failed to create set the format of the primary buffer"</span>);
+00454 }
+00455
+00456 <span class="comment">// Fill the buffer with silence</span>
+00457 <span class="comment">/* LPVOID ptr;</span>
+00458 <span class="comment"> DWORD bytes;</span>
+00459 <span class="comment"></span>
+00460 <span class="comment"> HRESULT hr = _PrimaryBuffer-&gt;Lock(0, 0, &amp;ptr, &amp;bytes, NULL, NULL, DSBLOCK_ENTIREBUFFER);</span>
+00461 <span class="comment"> if (FAILED(hr))</span>
+00462 <span class="comment"> {</span>
+00463 <span class="comment"> switch (hr)</span>
+00464 <span class="comment"> {</span>
+00465 <span class="comment"> case DSERR_BUFFERLOST:</span>
+00466 <span class="comment"> throw ESoundDriver("Failed to lock the DirectSound primary buffer : DSERR_BUFFERLOST");</span>
+00467 <span class="comment"> case DSERR_INVALIDCALL:</span>
+00468 <span class="comment"> throw ESoundDriver("Failed to lock the DirectSound primary buffer : DSERR_INVALIDCALL");</span>
+00469 <span class="comment"> case DSERR_INVALIDPARAM:</span>
+00470 <span class="comment"> throw ESoundDriver("Failed to lock the DirectSound primary buffer : DSERR_INVALIDPARAM");</span>
+00471 <span class="comment"> case DSERR_PRIOLEVELNEEDED:</span>
+00472 <span class="comment"> throw ESoundDriver("Failed to lock the DirectSound primary buffer : DSERR_PRIOLEVELNEEDED");</span>
+00473 <span class="comment"> default:</span>
+00474 <span class="comment"> throw ESoundDriver("Failed to lock the DirectSound primary buffer : unkown error");</span>
+00475 <span class="comment"> </span>
+00476 <span class="comment"> }</span>
+00477 <span class="comment"> }</span>
+00478 <span class="comment"></span>
+00479 <span class="comment"> memset(ptr, 0, bytes);</span>
+00480 <span class="comment"> </span>
+00481 <span class="comment"> _PrimaryBuffer-&gt;Unlock(ptr, bytes, 0, 0);</span>
+00482 <span class="comment">*/</span>
+00483
+00484 <a class="code" href="a04558.html#a11">uint32</a> numBuffers = <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda2">countHw3DBuffers</a>();
+00485 <span class="keywordflow">if</span> (numBuffers == 0)
+00486 {
+00487 numBuffers = 31;
+00488 }
+00489
+00490 <span class="comment">/*</span>
+00491 <span class="comment"> _Sources = new CSourceDSound*[numBuffers];</span>
+00492 <span class="comment"></span>
+00493 <span class="comment"></span>
+00494 <span class="comment"> for (uint i = 0; i &lt; numBuffers; i++) </span>
+00495 <span class="comment"> {</span>
+00496 <span class="comment"> _Sources[i] = 0;</span>
+00497 <span class="comment"> }</span>
+00498 <span class="comment"></span>
+00499 <span class="comment"> try</span>
+00500 <span class="comment"> {</span>
+00501 <span class="comment"> for (i = 0; i &lt; numBuffers; i++) </span>
+00502 <span class="comment"> {</span>
+00503 <span class="comment"> _Sources[i] = new CSourceDSound(i);</span>
+00504 <span class="comment"> _Sources[i]-&gt;init(_DirectSound);</span>
+00505 <span class="comment"> _SourceCount++;</span>
+00506 <span class="comment"> }</span>
+00507 <span class="comment"> }</span>
+00508 <span class="comment"> catch (ESoundDriver&amp; e)</span>
+00509 <span class="comment"> {</span>
+00510 <span class="comment"> // Okay, here's the situation: I'm listening to WinAmp while debugging.</span>
+00511 <span class="comment"> // The caps told me there were 31 buffers available. In reality, there were</span>
+00512 <span class="comment"> // only 30 available because WinAmp was using one. Somehow DirectSound didn't</span>
+00513 <span class="comment"> // notice. So when creating buffer 31, an exception was thrown. </span>
+00514 <span class="comment"> // If something like this happens, don't bother and go on with the buffers we've </span>
+00515 <span class="comment"> // got. If no buffers are created at all, throw the exception again.</span>
+00516 <span class="comment"></span>
+00517 <span class="comment"> if (_Sources == 0)</span>
+00518 <span class="comment"> {</span>
+00519 <span class="comment"> throw e;</span>
+00520 <span class="comment"> }</span>
+00521 <span class="comment"> }</span>
+00522 <span class="comment"></span>
+00523 <span class="comment">*/</span>
+00524
+00525
+00526 TIMECAPS tcaps;
+00527
+00528 timeGetDevCaps(&amp;tcaps, <span class="keyword">sizeof</span>(TIMECAPS));
+00529 <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr7">_TimerResolution</a> = (tcaps.wPeriodMin &gt; 10)? tcaps.wPeriodMin : 10;
+00530 timeBeginPeriod(_TimerResolution);
+00531
+00532
+00533
+00534 <span class="preprocessor">#if NLSOUND_PROFILE</span>
+00535 <span class="preprocessor"></span> <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i = 0; i &lt; 1024; i++)
+00536 {
+00537 _TimerInterval[i] = 0;
+00538 }
+00539
+00540 _TimerDate = CTime::getPerformanceTime();
+00541 <span class="preprocessor">#endif</span>
+00542 <span class="preprocessor"></span>
+00543
+00544
+00545
+00546 <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr6">_TimerID</a> = timeSetEvent(_TimerPeriod, 0, &amp;CSoundDriverDSound::TimerCallback, (DWORD)<span class="keyword">this</span>, TIME_CALLBACK_FUNCTION | TIME_PERIODIC);
+00547
+00548 <span class="keywordflow">if</span> (<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr6">_TimerID</a> == NULL)
+00549 {
+00550 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Failed to create the timer"</span>);
+00551 }
+00552
+00553
+00554
+00555
+00556 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00557 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSounde1" doxytag="NLSOUND::CSoundDriverDSound::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="a03420.html">CSoundDriverDSound</a>* NLSOUND::CSoundDriverDSound::instance </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Return the instance of the singleton.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06421.html#l00055">55</a> of file <a class="el" href="a06421.html">sound_driver_dsound.h</a>.
+<p>
+<div class="fragment"><pre>00055 { <span class="keywordflow">return</span> <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundv0">_Instance</a>; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSounda12" doxytag="NLSOUND::CSoundDriverDSound::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"> bool NLSOUND::CSoundDriverDSound::readRawBuffer </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02298.html">IBuffer</a> *&nbsp;</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 &amp;&nbsp;</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> *&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</td>
+ <td class="mdname" nowrap> <em>frequency</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </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="a06420.html#l00852">852</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</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>00853 {
+00854 <span class="keywordflow">return</span> ((CBufferDSound*) destbuffer)-&gt;readRawBuffer(name, rawData, dataSize, format, frequency);
+00855 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSounda13" doxytag="NLSOUND::CSoundDriverDSound::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"> bool NLSOUND::CSoundDriverDSound::readWavBuffer </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02298.html">IBuffer</a> *&nbsp;</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 &amp;&nbsp;</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> *&nbsp;</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>&nbsp;</td>
+ <td class="mdname" nowrap> <em>dataSize</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Load a wave file in to the buffer.
+<p>
+
+<p>
+Implements <a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera8">NLSOUND::ISoundDriver</a>.
+<p>
+Definition at line <a class="el" href="a06420.html#l00847">847</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</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>00848 {
+00849 <span class="keywordflow">return</span> ((CBufferDSound*) destbuffer)-&gt;readWavBuffer(name, wavData, dataSize);
+00850 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSoundd4" doxytag="NLSOUND::CSoundDriverDSound::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::CSoundDriverDSound::removeBuffer </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02298.html">IBuffer</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>buffer</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private, virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Remove a buffer (should be called by the friend destructor of the buffer class).
+<p>
+
+<p>
+Implements <a class="el" href="a03419.html#NLSOUND_1_1ISoundDriverb1">NLSOUND::ISoundDriver</a>.
+<p>
+Definition at line <a class="el" href="a06420.html#l00835">835</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l00649">buffer</a>.
+<p>
+<div class="fragment"><pre>00836 {
+00837 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSoundd5" doxytag="NLSOUND::CSoundDriverDSound::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::CSoundDriverDSound::removeSource </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03428.html">ISource</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>source</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private, virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Remove a source (should be called by the friend destructor of the source class).
+<p>
+
+<p>
+Implements <a class="el" href="a03419.html#NLSOUND_1_1ISoundDriverb2">NLSOUND::ISoundDriver</a>.
+<p>
+Definition at line <a class="el" href="a06420.html#l00879">879</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</a>.
+<p>
+<div class="fragment"><pre>00880 {
+00881 <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr4">_Sources</a>.erase((CSourceDSound*) source);
+00882 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSounda14" doxytag="NLSOUND::CSoundDriverDSound::setGain" ></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::CSoundDriverDSound::setGain </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>gain</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Set the gain (volume value inside [0 , 1]). (default: 1) 0.0 -&gt; silence 0.5 -&gt; -6dB 1.0 -&gt; no attenuation values &gt; 1 (amplification) not supported by most drivers
+<p>
+Definition at line <a class="el" href="a06420.html#l00930">930</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06421.html#l00148">_PrimaryBuffer</a>, and <a class="el" href="a05622.html#l00101">nldebug</a>.
+<p>
+<div class="fragment"><pre>00931 {
+00932 <span class="keywordflow">if</span> (<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr2">_PrimaryBuffer</a> != 0)
+00933 {
+00934 <span class="keywordflow">if</span> (gain &lt; 0.00001f)
+00935 {
+00936 gain = 0.00001f;
+00937 }
+00938
+00939 <span class="comment">/* convert from linear amplitude to hundredths of decibels */</span>
+00940 LONG volume = (LONG)(100.0 * 20.0 * log10(gain));
+00941
+00942 <span class="keywordflow">if</span> (volume &lt; DSBVOLUME_MIN)
+00943 {
+00944 volume = DSBVOLUME_MIN;
+00945 }
+00946 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (volume &gt; DSBVOLUME_MAX)
+00947 {
+00948 volume = DSBVOLUME_MAX;
+00949 }
+00950
+00951 HRESULT hr = <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr2">_PrimaryBuffer</a>-&gt;SetVolume(volume);
+00952
+00953 <span class="keywordflow">if</span> (hr != DS_OK)
+00954 {
+00955 <a class="code" href="a04199.html#a0">nldebug</a>(<span class="stringliteral">"Failed to set the volume"</span>);
+00956 }
+00957 }
+00958 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSoundd6" doxytag="NLSOUND::CSoundDriverDSound::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"> void NLSOUND::CSoundDriverDSound::startBench </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private, virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </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="a06420.html#l01056">1056</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</a>.
+<p>
+References <a class="el" href="a05787.html#l00241">NLMISC::CHTimer::startBench()</a>.
+<p>
+<div class="fragment"><pre>01057 {
+01058 <a class="code" href="a02640.html#NLMISC_1_1CHTimere11">NLMISC::CHTimer::startBench</a>();
+01059 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSoundh0" doxytag="NLSOUND::CSoundDriverDSound::TimerCallback" ></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 CALLBACK NLSOUND::CSoundDriverDSound::TimerCallback </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">UINT&nbsp;</td>
+ <td class="mdname" nowrap> <em>uID</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>UINT&nbsp;</td>
+ <td class="mdname" nowrap> <em>uMsg</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>DWORD&nbsp;</td>
+ <td class="mdname" nowrap> <em>dwUser</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>DWORD&nbsp;</td>
+ <td class="mdname" nowrap> <em>dw1</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>DWORD&nbsp;</td>
+ <td class="mdname" nowrap> <em>dw2</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static, private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06420.html#l00679">679</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06420.html#l00053">_TimerPeriod</a>, <a class="el" href="a06552.html#l00055">NLMISC::CTime::getLocalTime()</a>, <a class="el" href="a06553.html#l00047">NLMISC::TTime</a>, and <a class="el" href="a06420.html#l00703">update()</a>.
+<p>
+<div class="fragment"><pre>00680 {
+00681 <span class="comment">// a little speed check</span>
+00682 <span class="keyword">static</span> <a class="code" href="a05378.html#a242">NLMISC::TTime</a> lastUpdate = <a class="code" href="a02142.html#NLMISC_1_1CTimee0">NLMISC::CTime::getLocalTime</a>();
+00683 <a class="code" href="a05378.html#a242">NLMISC::TTime</a> now = <a class="code" href="a02142.html#NLMISC_1_1CTimee0">NLMISC::CTime::getLocalTime</a>();
+00684
+00685 <span class="keywordflow">if</span> (now - lastUpdate &gt; <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundv1">_TimerPeriod</a> * 2)
+00686 {
+00687 <span class="comment">// nlwarning("CSoundDriverDSound::TimerCallback : no update since %u millisec (nominal update = %u", uint32(now-lastUpdate), uint32(_TimerPeriod));</span>
+00688 }
+00689 <span class="keywordflow">else</span>
+00690 {
+00691 <span class="comment">// nldebug("Callback delay = %u ms", uint32(now-lastUpdate));</span>
+00692 }
+00693
+00694 lastUpdate = now;
+00695
+00696
+00697 <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda8">CSoundDriverDSound</a>* driver = (<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda8">CSoundDriverDSound</a>*) dwUser;
+00698 driver-&gt;update();
+00699 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSounda15" doxytag="NLSOUND::CSoundDriverDSound::update" ></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::CSoundDriverDSound::update </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Update all the driver and its sources. To be called only by the timer callback.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06420.html#l00703">703</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06420.html#l00053">_TimerPeriod</a>, <a class="el" href="a06552.html#l00055">NLMISC::CTime::getLocalTime()</a>, <a class="el" href="a05788.html#l00056">H_AUTO</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a06553.html#l00048">NLMISC::TTicks</a>, <a class="el" href="a06553.html#l00047">NLMISC::TTime</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+Referenced by <a class="el" href="a06420.html#l00679">TimerCallback()</a>.
+<p>
+<div class="fragment"><pre>00704 {
+00705 <a class="code" href="a04365.html#a4">H_AUTO</a>(NLSOUND_DSoundUpdate)
+00706 #<span class="keywordflow">if</span> NLSOUND_PROFILE
+00707 <a class="code" href="a05378.html#a243">TTicks</a> tnow = CTime::getPerformanceTime();
+00708 <span class="preprocessor">#endif</span>
+00709 <span class="preprocessor"></span>
+00710 <a class="code" href="a05378.html#a242">NLMISC::TTime</a> now = <a class="code" href="a02142.html#NLMISC_1_1CTimee0">NLMISC::CTime::getLocalTime</a>();
+00711
+00712 set&lt;CSourceDSound*&gt;::iterator first(<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr4">_Sources</a>.begin()), last(<a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr4">_Sources</a>.end());
+00713 <span class="keywordflow">for</span> (;first != last; ++first)
+00714 {
+00715 <span class="keywordflow">if</span> ((*first)-&gt;needsUpdate())
+00716 {
+00717 <span class="keywordflow">if</span> ((*first)-&gt;update())
+00718 {
+00719 <span class="preprocessor">#if NLSOUND_PROFILE</span>
+00720 <span class="preprocessor"></span> _UpdateSources++;
+00721 <span class="preprocessor">#endif</span>
+00722 <span class="preprocessor"></span> }
+00723 }
+00724 }
+00725
+00726 <span class="comment">/*</span>
+00727 <span class="comment"> set&lt;CSourceDSound*&gt;::iterator iter;</span>
+00728 <span class="comment"></span>
+00729 <span class="comment"> iter = _Sources.begin();</span>
+00730 <span class="comment"></span>
+00731 <span class="comment"></span>
+00732 <span class="comment"> if ((iter != _Sources.end()) &amp;&amp; (*iter)-&gt;needsUpdate())</span>
+00733 <span class="comment"> {</span>
+00734 <span class="comment"> while (iter != _Sources.end())</span>
+00735 <span class="comment"> {</span>
+00736 <span class="comment">// if ((*iter)-&gt;update2()) {</span>
+00737 <span class="comment"> if ((*iter)-&gt;update()) </span>
+00738 <span class="comment"> {</span>
+00739 <span class="comment">#if NLSOUND_PROFILE</span>
+00740 <span class="comment"> _UpdateSources++;</span>
+00741 <span class="comment">#endif</span>
+00742 <span class="comment"> }</span>
+00743 <span class="comment"> iter++;</span>
+00744 <span class="comment"> }</span>
+00745 <span class="comment"> }</span>
+00746 <span class="comment"></span>
+00747 <span class="comment">*/</span>
+00748 {
+00749 <a class="code" href="a05378.html#a242">NLMISC::TTime</a> last = CTime::getLocalTime() - now;
+00750 <span class="keywordflow">if</span> (last &gt; <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundv1">_TimerPeriod</a> / 2)
+00751 {
+00752 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"CSoundDriverDSound::TimerCallback : update took %u millisec"</span>, (<a class="code" href="a04558.html#a11">uint32</a>)last);
+00753 }
+00754 }
+00755
+00756 <span class="preprocessor">#if NLSOUND_PROFILE</span>
+00757 <span class="preprocessor"></span> _TotalUpdateTime += 1000.0 * CTime::ticksToSecond(CTime::getPerformanceTime() - tnow);
+00758 _UpdateCount++;
+00759 <span class="preprocessor">#endif</span>
+00760 <span class="preprocessor"></span>}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSounda16" doxytag="NLSOUND::CSoundDriverDSound::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"> void NLSOUND::CSoundDriverDSound::writeProfile </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">std::ostream &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>out</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </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="a06420.html#l00635">635</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06421.html#l00145">_DirectSound</a>, and <a class="el" href="a06420.html#l00911">countPlayingSources()</a>.
+<p>
+<div class="fragment"><pre>00636 {
+00637 <span class="comment">// Write the available sound devices</span>
+00638 CDeviceDescription* <a class="code" href="a03889.html">list</a> = CDeviceDescription::_List;
+00639 <span class="keywordflow">while</span> (list) {
+00640 out &lt;&lt; list-&gt;_Description &lt;&lt; <span class="stringliteral">"\n"</span>;
+00641 list = list-&gt;_Next;
+00642 }
+00643
+00644 out &lt;&lt; <span class="stringliteral">"\n"</span>;
+00645
+00646 <span class="comment">// Write the buffers sizes</span>
+00647 out &lt;&lt; <span class="stringliteral">"buffer size: "</span> &lt;&lt; (<span class="keywordtype">int</span>)CSourceDSound::_SecondaryBufferSize &lt;&lt; <span class="stringliteral">"\n"</span>;
+00648 out &lt;&lt; <span class="stringliteral">"copy size: "</span> &lt;&lt; (<span class="keywordtype">int</span>)CSourceDSound::_UpdateCopySize &lt;&lt; <span class="stringliteral">"\n"</span>;
+00649 out &lt;&lt; <span class="stringliteral">"swap size: "</span> &lt;&lt; (<span class="keywordtype">int</span>)CSourceDSound::_SwapCopySize &lt;&lt; <span class="stringliteral">"\n"</span>;
+00650 out &lt;&lt; <span class="stringliteral">"\n"</span>;
+00651
+00652 <span class="comment">// Write the number of hardware buffers </span>
+00653 DSCAPS caps;
+00654 caps.dwSize = <span class="keyword">sizeof</span>(caps);
+00655 <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr1">_DirectSound</a>-&gt;GetCaps(&amp;caps);
+00656
+00657 cout &lt;&lt; <span class="stringliteral">"3d hw buffers: "</span> &lt;&lt; caps.dwMaxHw3DAllBuffers &lt;&lt; <span class="stringliteral">"\n"</span>;
+00658 cout &lt;&lt; <span class="stringliteral">"2d hw buffers: "</span> &lt;&lt; caps.dwMaxHwMixingAllBuffers &lt;&lt; <span class="stringliteral">"\n"</span>;
+00659 out &lt;&lt; <span class="stringliteral">"\n"</span>;
+00660
+00661 <span class="comment">// Write the number of hardware buffers </span>
+00662 <span class="preprocessor">#if NLSOUND_PROFILE</span>
+00663 <span class="preprocessor"></span> out &lt;&lt; <span class="stringliteral">"update time total --- "</span> &lt;&lt; getAverageUpdateTime()&lt;&lt; <span class="stringliteral">"\n"</span>;
+00664 out &lt;&lt; <span class="stringliteral">"update time source --- "</span> &lt;&lt; CSourceDSound::getAverageUpdateTime() &lt;&lt; <span class="stringliteral">"\n"</span>;
+00665 out &lt;&lt; <span class="stringliteral">"update --- t: "</span> &lt;&lt; CSourceDSound::getAverageCumulTime();
+00666 out &lt;&lt; <span class="stringliteral">" - p: "</span> &lt;&lt; CSourceDSound::getAveragePosTime();
+00667 out &lt;&lt; <span class="stringliteral">" - l: "</span> &lt;&lt; CSourceDSound::getAverageLockTime();
+00668 out &lt;&lt; <span class="stringliteral">" - c: "</span> &lt;&lt; CSourceDSound::getAverageCopyTime();
+00669 out &lt;&lt; <span class="stringliteral">" - u: "</span> &lt;&lt; CSourceDSound::getAverageUnlockTime() &lt;&lt; <span class="stringliteral">"\n"</span>;
+00670 out &lt;&lt; <span class="stringliteral">"update percentage: --- "</span> &lt;&lt; getUpdatePercentage() &lt;&lt; <span class="stringliteral">"\n"</span>;
+00671 out &lt;&lt; <span class="stringliteral">"update num sources --- "</span> &lt;&lt; (<span class="keywordtype">int</span>)getAverageUpdateSources() &lt;&lt; <span class="stringliteral">"\n"</span>;
+00672 out &lt;&lt; <span class="stringliteral">"update byte size --- "</span> &lt;&lt; CSourceDSound::getAverageUpdateSize() &lt;&lt; <span class="stringliteral">"\n"</span>;
+00673 out &lt;&lt; <span class="stringliteral">"swap time --- "</span> &lt;&lt; CSourceDSound::getTestAverage() &lt;&lt; <span class="stringliteral">"\n"</span>;
+00674 out &lt;&lt; <span class="stringliteral">"src --- "</span> &lt;&lt; <a class="code" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda4">countPlayingSources</a>() &lt;&lt; <span class="stringliteral">"\n"</span>;
+00675 <span class="preprocessor">#endif</span>
+00676 <span class="preprocessor"></span>}
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Field Documentation</h2>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSoundr0" doxytag="NLSOUND::CSoundDriverDSound::_Caps" ></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"> DSCAPS <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr0">NLSOUND::CSoundDriverDSound::_Caps</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06421.html#l00151">151</a> of file <a class="el" href="a06421.html">sound_driver_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06420.html#l00318">init()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSoundr1" doxytag="NLSOUND::CSoundDriverDSound::_DirectSound" ></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"> LPDIRECTSOUND8 <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr1">NLSOUND::CSoundDriverDSound::_DirectSound</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06421.html#l00145">145</a> of file <a class="el" href="a06421.html">sound_driver_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06420.html#l00779">countHw2DBuffers()</a>, <a class="el" href="a06420.html#l00764">countHw3DBuffers()</a>, <a class="el" href="a06420.html#l00860">createSource()</a>, <a class="el" href="a06420.html#l00318">init()</a>, <a class="el" href="a06420.html#l00635">writeProfile()</a>, and <a class="el" href="a06420.html#l00561">~CSoundDriverDSound()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSoundv0" doxytag="NLSOUND::CSoundDriverDSound::_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="a03420.html">CSoundDriverDSound</a> * <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundv0">NLSOUND::CSoundDriverDSound::_Instance</a> = NULL<code> [static, private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06420.html#l00052">52</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSoundr2" doxytag="NLSOUND::CSoundDriverDSound::_PrimaryBuffer" ></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"> LPDIRECTSOUNDBUFFER <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr2">NLSOUND::CSoundDriverDSound::_PrimaryBuffer</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06421.html#l00148">148</a> of file <a class="el" href="a06421.html">sound_driver_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06420.html#l00820">createBuffer()</a>, <a class="el" href="a06420.html#l00794">createListener()</a>, <a class="el" href="a06420.html#l00860">createSource()</a>, <a class="el" href="a06420.html#l00962">getGain()</a>, <a class="el" href="a06420.html#l00318">init()</a>, <a class="el" href="a06420.html#l00930">setGain()</a>, and <a class="el" href="a06420.html#l00561">~CSoundDriverDSound()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSoundr3" doxytag="NLSOUND::CSoundDriverDSound::_SourceCount" ></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="a03420.html#NLSOUND_1_1CSoundDriverDSoundr3">NLSOUND::CSoundDriverDSound::_SourceCount</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06421.html#l00158">158</a> of file <a class="el" href="a06421.html">sound_driver_dsound.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSoundr4" doxytag="NLSOUND::CSoundDriverDSound::_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::set&lt;<a class="el" href="a03430.html">CSourceDSound</a>*&gt; <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr4">NLSOUND::CSoundDriverDSound::_Sources</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06421.html#l00155">155</a> of file <a class="el" href="a06421.html">sound_driver_dsound.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSoundr5" doxytag="NLSOUND::CSoundDriverDSound::_StringMapper" ></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"> IStringMapperProvider* <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr5">NLSOUND::CSoundDriverDSound::_StringMapper</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+The string mapper provided by client code.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06421.html#l00169">169</a> of file <a class="el" href="a06421.html">sound_driver_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06421.html#l00112">getStringMapper()</a>, and <a class="el" href="a06420.html#l00318">init()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSoundr6" doxytag="NLSOUND::CSoundDriverDSound::_TimerID" ></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"> UINT <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr6">NLSOUND::CSoundDriverDSound::_TimerID</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06421.html#l00161">161</a> of file <a class="el" href="a06421.html">sound_driver_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06420.html#l00318">init()</a>, and <a class="el" href="a06420.html#l00561">~CSoundDriverDSound()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSoundv1" doxytag="NLSOUND::CSoundDriverDSound::_TimerPeriod" ></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#a11">uint32</a> <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundv1">NLSOUND::CSoundDriverDSound::_TimerPeriod</a> = 100<code> [static, private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06420.html#l00053">53</a> of file <a class="el" href="a06420.html">sound_driver_dsound.cpp</a>.
+<p>
+Referenced by <a class="el" href="a06420.html#l00318">init()</a>, <a class="el" href="a06420.html#l00679">TimerCallback()</a>, and <a class="el" href="a06420.html#l00703">update()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSoundr7" doxytag="NLSOUND::CSoundDriverDSound::_TimerResolution" ></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#a11">uint32</a> <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr7">NLSOUND::CSoundDriverDSound::_TimerResolution</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06421.html#l00164">164</a> of file <a class="el" href="a06421.html">sound_driver_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06420.html#l00318">init()</a>, and <a class="el" href="a06420.html#l00561">~CSoundDriverDSound()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSoundDriverDSoundr8" doxytag="NLSOUND::CSoundDriverDSound::_UseEAX" ></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 <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundr8">NLSOUND::CSoundDriverDSound::_UseEAX</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+The EAX support is requested and accepted (ie, there is enougth hardware 3D buffer).
+<p>
+
+<p>
+Definition at line <a class="el" href="a06421.html#l00167">167</a> of file <a class="el" href="a06421.html">sound_driver_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06420.html#l00860">createSource()</a>, and <a class="el" href="a06420.html#l00318">init()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1ISoundDrivers0" doxytag="NLSOUND::CSoundDriverDSound::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>
+ &nbsp;
+ </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="a06421.html">sound_driver_dsound.h</a><li><a class="el" href="a06420.html">sound_driver_dsound.cpp</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 14:44:35 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>