aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03430.html
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
committerneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
commit0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch)
tree2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /docs/doxygen/nel/a03430.html
downloadnevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz
nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip
Initial commit
Diffstat (limited to 'docs/doxygen/nel/a03430.html')
-rw-r--r--docs/doxygen/nel/a03430.html4797
1 files changed, 4797 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03430.html b/docs/doxygen/nel/a03430.html
new file mode 100644
index 00000000..05287924
--- /dev/null
+++ b/docs/doxygen/nel/a03430.html
@@ -0,0 +1,4797 @@
+<!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::CSourceDSound 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::CSourceDSound Class Reference</h1><code>#include &lt;<a class="el" href="a06430.html">source_dsound.h</a>&gt;</code>
+<p>
+<p>Inheritance diagram for NLSOUND::CSourceDSound:
+<p><center><img src="a03430.png" usemap="#NLSOUND::CSourceDSound_map" border="0" alt=""></center>
+<map name="NLSOUND::CSourceDSound_map">
+<area href="a03428.html" alt="NLSOUND::ISource" shape="rect" coords="0,0,173,24">
+</map>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+DirectSound sound source<p>
+For arguments as 3D vectors, use the NeL vector coordinate system<p>
+<dl compact><dt><b>Author:</b></dt><dd>Peter Hanappe <p>
+Nevrax France </dd></dl>
+<dl compact><dt><b>Date:</b></dt><dd>2002 </dd></dl>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06430.html#l00099">99</a> of file <a class="el" href="a06430.html">source_dsound.h</a>.<table border=0 cellpadding=0 cellspacing=0>
+<tr><td></td></tr>
+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSounda0">CSourceDSound</a> (<a class="el" href="a04558.html#a15">uint</a> sourcename=0)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. <a href="#NLSOUND_1_1CSourceDSounda0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02298.html">IBuffer</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSounda1">getBuffer</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the buffer associated with this source. <a href="#NLSOUND_1_1CSourceDSounda1"></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="a03430.html#NLSOUND_1_1CSourceDSounda2">init</a> (LPDIRECTSOUND8 directSound, bool useEax)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize the DirectSound buffers. Called by the sound driver only. <a href="#NLSOUND_1_1CSourceDSounda2"></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="a03430.html#NLSOUND_1_1CSourceDSounda3">reset</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="a03430.html#NLSOUND_1_1CSourceDSounda4">setAlpha</a> (double 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="a03430.html#NLSOUND_1_1CSourceDSounda5">sourceName</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the OpenAL source name. <a href="#NLSOUND_1_1CSourceDSounda5"></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="a03430.html#NLSOUND_1_1CSourceDSounda6">updateVolume</a> (const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;listener)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSounda7">~CSourceDSound</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <a href="#NLSOUND_1_1CSourceDSounda7"></a><br><br></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Initialization</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03428.html#NLSOUND_1_1ISourcez1330_2">setStreamLoader</a> (<a class="el" href="a03862.html">ILoader</a> *loader)</td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">Source properties</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundz1314_0">getCone</a> (float &amp;innerAngle, float &amp;outerAngle, float &amp;outerGain) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the cone angles (in radian). <a href="#NLSOUND_1_1CSourceDSoundz1314_0"></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="a03430.html#NLSOUND_1_1CSourceDSoundz1314_1">getDirection</a> (<a class="el" href="a03128.html">NLMISC::CVector</a> &amp;dir) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the direction vector. <a href="#NLSOUND_1_1CSourceDSoundz1314_1"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundz1314_2">getGain</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the gain. <a href="#NLSOUND_1_1CSourceDSoundz1314_2"></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="a03430.html#NLSOUND_1_1CSourceDSoundz1314_3">getMinMaxDistances</a> (float &amp;mindist, float &amp;maxdist) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the min and max distances. <a href="#NLSOUND_1_1CSourceDSoundz1314_3"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundz1314_4">getPitch</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the pitch. <a href="#NLSOUND_1_1CSourceDSoundz1314_4"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundz1314_5">getPos</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundz1314_6">getSourceRelativeMode</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the source relative mode. <a href="#NLSOUND_1_1CSourceDSoundz1314_6"></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="a03430.html#NLSOUND_1_1CSourceDSoundz1314_7">getVelocity</a> (<a class="el" href="a03128.html">NLMISC::CVector</a> &amp;vel) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the velocity vector. <a href="#NLSOUND_1_1CSourceDSoundz1314_7"></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="a03430.html#NLSOUND_1_1CSourceDSoundz1314_8">setCone</a> (float innerAngle, float outerAngle, float outerGain)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the cone angles (in radian) and gain (in [0 , 1]) (default: 2PI, 2PI, 0) (3D mode only). <a href="#NLSOUND_1_1CSourceDSoundz1314_8"></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="a03430.html#NLSOUND_1_1CSourceDSoundz1314_9">setDirection</a> (const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;dir)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the direction vector (3D mode only) (default: (0,0,0) as non-directional). <a href="#NLSOUND_1_1CSourceDSoundz1314_9"></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="a03430.html#NLSOUND_1_1CSourceDSoundz1314_10">setEAXProperty</a> (<a class="el" href="a04558.html#a15">uint</a> prop, void *<a class="el" href="a04223.html#a658">value</a>, <a class="el" href="a04558.html#a15">uint</a> valuesize)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set any EAX source property if EAX available. <a href="#NLSOUND_1_1CSourceDSoundz1314_10"></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="a03430.html#NLSOUND_1_1CSourceDSoundz1314_11">setGain</a> (float gain)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundz1314_12">setMinMaxDistances</a> (float mindist, float maxdist, bool deferred)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the min and max distances (default: 1, MAX_FLOAT) (3D mode only). <a href="#NLSOUND_1_1CSourceDSoundz1314_12"></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="a03430.html#NLSOUND_1_1CSourceDSoundz1314_13">setPitch</a> (float pitch)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundz1314_14">setPos</a> (const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;pos, bool deferred)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundz1314_15">setSourceRelativeMode</a> (bool mode)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the source relative mode. If true, positions are interpreted relative to the listener position (default: false). <a href="#NLSOUND_1_1CSourceDSoundz1314_15"></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="a03430.html#NLSOUND_1_1CSourceDSoundz1314_16">setVelocity</a> (const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;vel, bool deferred)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the velocity vector (3D mode only) (default: (0,0,0)). <a href="#NLSOUND_1_1CSourceDSoundz1314_16"></a><br><br></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Playback control</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundz1312_0">getLooping</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the looping state. <a href="#NLSOUND_1_1CSourceDSoundz1312_0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundz1312_1">getTime</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of milliseconds the source has been playing. <a href="#NLSOUND_1_1CSourceDSoundz1312_1"></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="a03430.html#NLSOUND_1_1CSourceDSoundz1312_2">isPaused</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the paused state. <a href="#NLSOUND_1_1CSourceDSoundz1312_2"></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="a03430.html#NLSOUND_1_1CSourceDSoundz1312_3">isPlaying</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the playing state. <a href="#NLSOUND_1_1CSourceDSoundz1312_3"></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="a03430.html#NLSOUND_1_1CSourceDSoundz1312_4">isStopped</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return true if playing is finished or <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundz1312_8">stop()</a> has been called. <a href="#NLSOUND_1_1CSourceDSoundz1312_4"></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="a03430.html#NLSOUND_1_1CSourceDSoundz1312_5">pause</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pause. Call <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundz1312_6">play()</a> to resume. <a href="#NLSOUND_1_1CSourceDSoundz1312_5"></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="a03430.html#NLSOUND_1_1CSourceDSoundz1312_6">play</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Play the static buffer (or stream in and play). <a href="#NLSOUND_1_1CSourceDSoundz1312_6"></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="a03430.html#NLSOUND_1_1CSourceDSoundz1312_7">setLooping</a> (bool l)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set looping on/off for future playbacks (default: off). <a href="#NLSOUND_1_1CSourceDSoundz1312_7"></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="a03430.html#NLSOUND_1_1CSourceDSoundz1312_8">stop</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stop playing. <a href="#NLSOUND_1_1CSourceDSoundz1312_8"></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="a03430.html#NLSOUND_1_1CSourceDSoundz1312_9">update</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Update the source (e.g. continue to stream the data in). <a href="#NLSOUND_1_1CSourceDSoundz1312_9"></a><br><br></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Initialization</div></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="a03430.html#NLSOUND_1_1CSourceDSoundz1310_0">getStaticBuffer</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the buffer, or NULL if streaming is used. <a href="#NLSOUND_1_1CSourceDSoundz1310_0"></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="a03430.html#NLSOUND_1_1CSourceDSoundz1310_1">setStaticBuffer</a> (<a class="el" href="a02298.html">IBuffer</a> *<a class="el" href="a04223.html#a589">buffer</a>)</td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">Initialization</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03428.html#NLSOUND_1_1ISourcez1330_2">setStreamLoader</a> (<a class="el" href="a03862.html">ILoader</a> *loader)</td></tr>
+
+<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03862.html">ILoader</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03428.html#NLSOUND_1_1ISourcep0">_Loader</a></td></tr>
+
+<tr><td colspan=2><br><h2>Private Types</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4">TSourceState</a> { <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy2">source_stoped</a>,
+<a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy0">source_playing</a>,
+<a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy1">source_silencing</a>,
+<a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy3">source_swap_pending</a>
+ }</td></tr>
+
+<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundd0">advanceFill</a> (<a class="el" href="a03432.html">TLockedBufferInfo</a> &amp;lbi, <a class="el" href="a04558.html#a15">uint</a> nbSample)</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="a03430.html#NLSOUND_1_1CSourceDSoundd1">checkFillCursor</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundd2">copySampleTo16BitsTrack</a> (void *dst, void *<a class="el" href="a04223.html#a652">src</a>, <a class="el" href="a04558.html#a15">uint</a> nbSample, <a class="el" href="a05381.html#a80">TSampleFormat</a> sourceFormat)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundd3">crossFade</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundd4">fadeIn</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundd5">fadeIn</a> (const <a class="el" href="a03432.html">TLockedBufferInfo</a> &amp;lbi)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundd6">fadeOut</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundd7">fadeOut</a> (const <a class="el" href="a03432.html">TLockedBufferInfo</a> &amp;lbi)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundd8">fill</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundd9">fillData</a> (<a class="el" href="a04558.html#a8">sint16</a> *dst, <a class="el" href="a04558.html#a15">uint</a> nbSample)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundd10">fillData</a> (const <a class="el" href="a03432.html">TLockedBufferInfo</a> &amp;lbi, int nbSample)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundd11">fillSilence</a> (const <a class="el" href="a03432.html">TLockedBufferInfo</a> &amp;lbi, int nbSample)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundd12">getCursors</a> (<a class="el" href="a03431.html">TCursors</a> &amp;cursors)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundd13">lock</a> (<a class="el" href="a04558.html#a11">uint32</a> writePos, <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a04223.html#a587">size</a>, <a class="el" href="a03432.html">TLockedBufferInfo</a> &amp;lockedInfo)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundd14">needsUpdate</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check whether the play position has advanced enough to require an update. <a href="#NLSOUND_1_1CSourceDSoundd14"></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="a03430.html#NLSOUND_1_1CSourceDSoundd15">release</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release all DirectSound resources. <a href="#NLSOUND_1_1CSourceDSoundd15"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundd16">silence</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundd17">swap</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundd18">unlock</a> (const <a class="el" href="a03432.html">TLockedBufferInfo</a> &amp;lockedInfo)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundd19">xfade</a> (const <a class="el" href="a03432.html">TLockedBufferInfo</a> &amp;lbi, <a class="el" href="a04558.html#a8">sint16</a> *<a class="el" href="a04223.html#a652">src</a>)</td></tr>
+
+<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>LPDIRECTSOUND3DBUFFER&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03845.html">IBuffer::TADPCMState</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr1">_ADPCMState</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>double&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr2">_Alpha</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>CRITICAL_SECTION&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr3">_CriticalSection</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="a03430.html#NLSOUND_1_1CSourceDSoundr4">_FillOffset</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a05381.html#a80">TSampleFormat</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr5">_Format</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr6">_Freq</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr7">_Gain</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="a03430.html#NLSOUND_1_1CSourceDSoundr8">_LastPlayPos</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr9">_Loop</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02298.html">IBuffer</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr10">_NextSample</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="a03430.html#NLSOUND_1_1CSourceDSoundr11">_PlayOffset</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03128.html">NLMISC::CVector</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr12">_Pos</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02298.html">IBuffer</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">_Sample</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="a03430.html#NLSOUND_1_1CSourceDSoundr14">_SampleFreq</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="a03430.html#NLSOUND_1_1CSourceDSoundr15">_SampleOffset</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="a03430.html#NLSOUND_1_1CSourceDSoundr16">_SampleRate</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="a03430.html#NLSOUND_1_1CSourceDSoundr17">_SampleSize</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>LPDIRECTSOUNDBUFFER&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</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="a03430.html#NLSOUND_1_1CSourceDSoundr19">_SilenceWriten</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="a03430.html#NLSOUND_1_1CSourceDSoundr20">_SourceName</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4">TSourceState</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a10">sint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr22">_Volume</a></td></tr>
+
+<tr><td colspan=2><br><h2>Static Private Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundv0">_DefaultChannels</a> = 1</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundv1">_DefaultSampleRate</a> = 22050</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundv2">_DefaultSampleSize</a> = 16</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="a03430.html#NLSOUND_1_1CSourceDSoundv3">_SecondaryBufferSize</a> = 0x10000</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="a03430.html#NLSOUND_1_1CSourceDSoundv4">_SizeMask</a> = 0xffff</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="a03430.html#NLSOUND_1_1CSourceDSoundv5">_SwapCopySize</a> = 0x8000</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="a03430.html#NLSOUND_1_1CSourceDSoundv6">_UpdateCopySize</a> = 0x4000</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="a03430.html#NLSOUND_1_1CSourceDSoundv7">_XFadeSize</a> = 64</td></tr>
+
+<tr><td colspan=2><br><h2>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>class&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundn0">CSoundDriverDSound</a></td></tr>
+
+</table>
+<hr><h2>Member Enumeration Documentation</h2>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundy4" doxytag="NLSOUND::CSourceDSound::TSourceState" ></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"> enum <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4">NLSOUND::CSourceDSound::TSourceState</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+<dl compact><dt><b>Enumeration values: </b></dt><dd>
+<table border=0 cellspacing=2 cellpadding=0>
+<tr><td valign=top><em><a class="anchor" name="NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy2" doxytag="source_stoped" ></a>source_stoped</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy0" doxytag="source_playing" ></a>source_playing</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy1" doxytag="source_silencing" ></a>source_silencing</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy3" doxytag="source_swap_pending" ></a>source_swap_pending</em>&nbsp;</td><td>
+</td></tr>
+</table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a06430.html#l00271">271</a> of file <a class="el" href="a06430.html">source_dsound.h</a>.
+<p>
+<div class="fragment"><pre>00272 {
+00273 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy2">source_stoped</a>,
+00274 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy0">source_playing</a>,
+00275 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy1">source_silencing</a>,
+00276 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy3">source_swap_pending</a>
+00277 };
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="NLSOUND_1_1CSourceDSounda0" doxytag="NLSOUND::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::CSourceDSound::CSourceDSound </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>sourcename</em> = 0 </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>
+
+<p>
+Definition at line <a class="el" href="a06429.html#l00111">111</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00413">_3DBuffer</a>, <a class="el" href="a06430.html#l00458">_Alpha</a>, <a class="el" href="a06430.html#l00415">_CriticalSection</a>, <a class="el" href="a06429.html#l00076">_DefaultSampleRate</a>, <a class="el" href="a06430.html#l00394">_FillOffset</a>, <a class="el" href="a06430.html#l00393">_LastPlayPos</a>, <a class="el" href="a06430.html#l00401">_Loop</a>, <a class="el" href="a06430.html#l00380">_PlayOffset</a>, <a class="el" href="a06430.html#l00374">_Sample</a>, <a class="el" href="a06430.html#l00382">_SampleFreq</a>, <a class="el" href="a06430.html#l00378">_SampleOffset</a>, <a class="el" href="a06430.html#l00388">_SampleRate</a>, <a class="el" href="a06430.html#l00376">_SampleSize</a>, <a class="el" href="a06430.html#l00407">_SecondaryBuffer</a>, <a class="el" href="a06430.html#l00368">_State</a>, <a class="el" href="a05381.html#a80a17">NLSOUND::Mono8</a>, <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy2">source_stoped</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00112 : <a class="code" href="a03428.html#NLSOUND_1_1ISourcea0">ISource</a>(),
+00113 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr20">_SourceName</a>(sourcename)
+00114 {
+00115 <span class="preprocessor">#if EAX_AVAILABLE == 1</span>
+00116 <span class="preprocessor"></span> _EAXSource = 0;
+00117 <span class="preprocessor">#endif</span>
+00118 <span class="preprocessor"></span> <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">_Sample</a> = 0;
+00119 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr17">_SampleSize</a> = 0;
+00120 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr15">_SampleOffset</a> = 0;
+00121 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr5">_Format</a> = <a class="code" href="a05381.html#a80a17">Mono8</a>;
+00122 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr14">_SampleFreq</a> = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv1">_DefaultSampleRate</a>;
+00123 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr4">_FillOffset</a> = 0;
+00124 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy2">source_stoped</a>;
+00125 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr11">_PlayOffset</a> = 0;
+00126 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr8">_LastPlayPos</a> = 0;
+00127
+00128 <span class="comment">// _BufferSize = 0;</span>
+00129 <span class="comment">// _SwapBuffer = 0;</span>
+00130 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a> = 0;
+00131 <span class="comment">// _SecondaryBufferState = NL_DSOUND_SILENCED;</span>
+00132 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a> = 0;
+00133 <span class="comment">// _NextWritePos = 0;</span>
+00134 <span class="comment">// _BytesWritten = 0;</span>
+00135 <span class="comment">// _SilenceWritten = 0;</span>
+00136 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr9">_Loop</a> = <span class="keyword">false</span>;
+00137 <span class="comment">// _EndPosition = 0;</span>
+00138 <span class="comment">// _EndState = NL_DSOUND_TAIL1;</span>
+00139 <span class="comment">// _UserState = NL_DSOUND_STOPPED;</span>
+00140 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr6">_Freq</a> = 1.0f;
+00141 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr16">_SampleRate</a> = _DefaultSampleRate;
+00142 <span class="comment">// _IsUsed = false;</span>
+00143 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr7">_Gain</a> = 1.0f;
+00144 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr22">_Volume</a> = 0;
+00145 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr2">_Alpha</a> = 0.0;
+00146 InitializeCriticalSection(&amp;_CriticalSection);
+00147 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSounda7" doxytag="NLSOUND::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::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> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Destructor.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06429.html#l00152">152</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00415">_CriticalSection</a>, <a class="el" href="a05622.html#l00101">nldebug</a>, and <a class="el" href="a06429.html#l00171">release()</a>.
+<p>
+<div class="fragment"><pre>00153 {
+00154 <a class="code" href="a04199.html#a0">nldebug</a>(<span class="stringliteral">"Destroying DirectSound source"</span>);
+00155
+00156 CSoundDriverDSound::instance()-&gt;removeSource(<span class="keyword">this</span>);
+00157
+00158 EnterCriticalSection(&amp;_CriticalSection);
+00159
+00160 <span class="comment">// Release the DirectSound buffer within the critical zone</span>
+00161 <span class="comment">// to avoid a call to update during deconstruction</span>
+00162 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd15">release</a>();
+00163
+00164 LeaveCriticalSection(&amp;_CriticalSection);
+00165 DeleteCriticalSection(&amp;_CriticalSection);
+00166 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundd0" doxytag="NLSOUND::CSourceDSound::advanceFill" ></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::CSourceDSound::advanceFill </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03432.html">TLockedBufferInfo</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>lbi</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>nbSample</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [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="a06429.html#l00662">662</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00394">_FillOffset</a>, <a class="el" href="a06429.html#l00070">_SecondaryBufferSize</a>, <a class="el" href="a06429.html#l00071">_SizeMask</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06430.html#l00308">NLSOUND::CSourceDSound::TLockedBufferInfo::Ptr1</a>, <a class="el" href="a06430.html#l00312">NLSOUND::CSourceDSound::TLockedBufferInfo::Ptr2</a>, <a class="el" href="a05646.html#l00645">size</a>, <a class="el" href="a06430.html#l00309">NLSOUND::CSourceDSound::TLockedBufferInfo::Size1</a>, <a class="el" href="a06430.html#l00313">NLSOUND::CSourceDSound::TLockedBufferInfo::Size2</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00688">play()</a>, <a class="el" href="a06429.html#l00827">stop()</a>, and <a class="el" href="a06429.html#l01059">update()</a>.
+<p>
+<div class="fragment"><pre>00663 {
+00664 <a class="code" href="a04558.html#a11">uint32</a> <a class="code" href="a04223.html#a587">size</a> = nbSample * 2;
+00665 <span class="keywordflow">if</span> (lbi.Size1 &lt; <a class="code" href="a04223.html#a587">size</a>)
+00666 {
+00667 <a class="code" href="a04223.html#a587">size</a> -= lbi.Size1;
+00668 lbi.Size1 = lbi.Size2;
+00669 lbi.Size2 = 0;
+00670 lbi.Ptr1 = lbi.Ptr2;
+00671 lbi.Ptr2 = 0;
+00672 }
+00673
+00674 <a class="code" href="a04199.html#a6">nlassert</a>(lbi.Size1 &gt;= size);
+00675 lbi.Size1 -= <a class="code" href="a04223.html#a587">size</a>;
+00676 lbi.Ptr1 += <a class="code" href="a04223.html#a587">size</a>/2;
+00677
+00678 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr4">_FillOffset</a> += nbSample*2;
+00679 <a class="code" href="a04199.html#a6">nlassert</a>(_FillOffset == (_FillOffset &amp; 0xfffffffC));
+00680 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr4">_FillOffset</a> &amp;= <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv4">_SizeMask</a>;
+00681 <span class="comment">// if (_FillOffset &gt;= _SecondaryBufferSize)</span>
+00682 <span class="comment">// _FillOffset -= _SecondaryBufferSize;</span>
+00683 <a class="code" href="a04199.html#a6">nlassert</a>(_FillOffset &lt; _SecondaryBufferSize);
+00684 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundd1" doxytag="NLSOUND::CSourceDSound::checkFillCursor" ></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> NLSOUND::CSourceDSound::checkFillCursor </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_1CSourceDSoundd2" doxytag="NLSOUND::CSourceDSound::copySampleTo16BitsTrack" ></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::CSourceDSound::copySampleTo16BitsTrack </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">void *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dst</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>void *&nbsp;</td>
+ <td class="mdname" nowrap> <em>src</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>nbSample</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>sourceFormat</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><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_1CSourceDSoundd3" doxytag="NLSOUND::CSourceDSound::crossFade" ></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::CSourceDSound::crossFade </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_1CSourceDSoundd4" doxytag="NLSOUND::CSourceDSound::fadeIn" ></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::CSourceDSound::fadeIn </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>
+
+<p>
+Referenced by <a class="el" href="a06429.html#l00688">play()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundd5" doxytag="NLSOUND::CSourceDSound::fadeIn" ></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::CSourceDSound::fadeIn </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03432.html">TLockedBufferInfo</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>lbi</em> </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>
+
+<p>
+Definition at line <a class="el" href="a06429.html#l00627">627</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06429.html#l00074">_XFadeSize</a>, <a class="el" href="a05646.html#l01173">alpha</a>, <a class="el" href="a05646.html#l00240">count</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06430.html#l00308">NLSOUND::CSourceDSound::TLockedBufferInfo::Ptr1</a>, <a class="el" href="a06430.html#l00312">NLSOUND::CSourceDSound::TLockedBufferInfo::Ptr2</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00097">sint16</a>, <a class="el" href="a06430.html#l00309">NLSOUND::CSourceDSound::TLockedBufferInfo::Size1</a>, <a class="el" href="a06430.html#l00313">NLSOUND::CSourceDSound::TLockedBufferInfo::Size2</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00628 {
+00629 <span class="comment">// do the XFade in integer fixed point arithmetic</span>
+00630
+00631 <a class="code" href="a04199.html#a6">nlassert</a>((_XFadeSize &amp; 0x1) == 0);
+00632 <a class="code" href="a04558.html#a15">uint</a> fade = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv7">_XFadeSize</a>;
+00633 <a class="code" href="a04558.html#a8">sint16</a> *ptr = lbi.Ptr1;
+00634 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a577">count</a> = lbi.Size1 /2;
+00635 <a class="code" href="a04558.html#a14">sint</a> <a class="code" href="a04223.html#a663">alpha</a>, invAlpha;
+00636
+00637 <span class="keywordflow">while</span> (fade &amp;&amp; <a class="code" href="a04223.html#a577">count</a>)
+00638 {
+00639 <a class="code" href="a04223.html#a663">alpha</a> = (fade&lt;&lt;16) / _XFadeSize;
+00640 invAlpha = 0x10000 - <a class="code" href="a04223.html#a663">alpha</a>;
+00641 *ptr = (*ptr*invAlpha) &gt;&gt; 16;
+00642 ++ptr;
+00643 --<a class="code" href="a04223.html#a577">count</a>;
+00644 --fade;
+00645 }
+00646
+00647 ptr = lbi.Ptr2;
+00648 <a class="code" href="a04223.html#a577">count</a> = lbi.Size2 /2;
+00649
+00650 <span class="keywordflow">while</span> (fade &amp;&amp; <a class="code" href="a04223.html#a577">count</a>)
+00651 {
+00652 <a class="code" href="a04223.html#a663">alpha</a> = (fade&lt;&lt;16) / _XFadeSize;
+00653 invAlpha = 0x10000 - <a class="code" href="a04223.html#a663">alpha</a>;
+00654 *ptr = (*ptr*invAlpha) &gt;&gt; 16;
+00655 ++ptr;
+00656 --<a class="code" href="a04223.html#a577">count</a>;
+00657 --fade;
+00658 }
+00659 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundd6" doxytag="NLSOUND::CSourceDSound::fadeOut" ></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::CSourceDSound::fadeOut </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>
+
+<p>
+Referenced by <a class="el" href="a06429.html#l00827">stop()</a>, and <a class="el" href="a06429.html#l01059">update()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundd7" doxytag="NLSOUND::CSourceDSound::fadeOut" ></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::CSourceDSound::fadeOut </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03432.html">TLockedBufferInfo</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>lbi</em> </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>
+
+<p>
+Definition at line <a class="el" href="a06429.html#l00598">598</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06429.html#l00074">_XFadeSize</a>, <a class="el" href="a05646.html#l01173">alpha</a>, <a class="el" href="a05646.html#l00240">count</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06430.html#l00308">NLSOUND::CSourceDSound::TLockedBufferInfo::Ptr1</a>, <a class="el" href="a06430.html#l00312">NLSOUND::CSourceDSound::TLockedBufferInfo::Ptr2</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00097">sint16</a>, <a class="el" href="a06430.html#l00309">NLSOUND::CSourceDSound::TLockedBufferInfo::Size1</a>, <a class="el" href="a06430.html#l00313">NLSOUND::CSourceDSound::TLockedBufferInfo::Size2</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00599 {
+00600 <a class="code" href="a04199.html#a6">nlassert</a>((_XFadeSize &amp; 0x1) == 0);
+00601 <a class="code" href="a04558.html#a15">uint</a> fade = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv7">_XFadeSize</a>;
+00602 <a class="code" href="a04558.html#a8">sint16</a> *ptr = lbi.Ptr1;
+00603 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a577">count</a> = lbi.Size1/2;
+00604 <a class="code" href="a04558.html#a14">sint</a> <a class="code" href="a04223.html#a663">alpha</a>;
+00605
+00606 <span class="keywordflow">while</span> (fade &amp;&amp; <a class="code" href="a04223.html#a577">count</a>)
+00607 {
+00608 <a class="code" href="a04223.html#a663">alpha</a> = (fade&lt;&lt;16) / _XFadeSize;
+00609 *ptr = (*ptr*<a class="code" href="a04223.html#a663">alpha</a>) &gt;&gt; 16;
+00610 ++ptr;
+00611 --<a class="code" href="a04223.html#a577">count</a>;
+00612 --fade;
+00613 }
+00614
+00615 ptr = lbi.Ptr2;
+00616 <a class="code" href="a04223.html#a577">count</a> = lbi.Size2/2;
+00617
+00618 <span class="keywordflow">while</span> (fade &amp;&amp; <a class="code" href="a04223.html#a577">count</a>)
+00619 {
+00620 <a class="code" href="a04223.html#a663">alpha</a> = (fade&lt;&lt;16) / _XFadeSize;
+00621 *ptr = (*ptr*<a class="code" href="a04223.html#a663">alpha</a>) &gt;&gt; 16;
+00622 ++ptr;
+00623 --<a class="code" href="a04223.html#a577">count</a>;
+00624 --fade;
+00625 }
+00626 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundd8" doxytag="NLSOUND::CSourceDSound::fill" ></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::CSourceDSound::fill </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_1CSourceDSoundd9" doxytag="NLSOUND::CSourceDSound::fillData" ></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::CSourceDSound::fillData </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a8">sint16</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dst</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>nbSample</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [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="a06429.html#l00432">432</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00418">_ADPCMState</a>, <a class="el" href="a06430.html#l00374">_Sample</a>, <a class="el" href="a06430.html#l00378">_SampleOffset</a>, <a class="el" href="a06430.html#l00376">_SampleSize</a>, <a class="el" href="a05646.html#l01013">data</a>, <a class="el" href="a05381.html#a80a19">NLSOUND::Mono16</a>, <a class="el" href="a05381.html#a80a18">NLSOUND::Mono16ADPCM</a>, <a class="el" href="a05381.html#a80a17">NLSOUND::Mono8</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00101">nldebug</a>, <a class="el" href="a05981.html#l00097">sint16</a>, <a class="el" href="a05981.html#l00095">sint8</a>, <a class="el" href="a05381.html#a80a21">NLSOUND::Stereo16</a>, <a class="el" href="a05381.html#a80a20">NLSOUND::Stereo8</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+<div class="fragment"><pre>00433 {
+00434 <a class="code" href="a04199.html#a6">nlassert</a>((nbSample &amp; 0xfffffffe) == nbSample);
+00435 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">_Sample</a> != 0)
+00436 {
+00437 <span class="keywordtype">void</span> *<a class="code" href="a04223.html#a637">data</a> = ((CBufferDSound*) <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">_Sample</a>)-&gt;getData();
+00438 <a class="code" href="a04558.html#a6">sint8</a> *data8;
+00439 <a class="code" href="a04558.html#a7">uint8</a> *dataAdpcm;
+00440 <a class="code" href="a04558.html#a8">sint16</a> *data16;
+00441 <a class="code" href="a04558.html#a15">uint</a> i;
+00442
+00443 <span class="comment">//nldebug("Filling from %p to %p (%p sample, %p bytes)", dst, dst+nbSample, nbSample, nbSample*2);</span>
+00444
+00445
+00446 <span class="keywordflow">switch</span>(<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr5">_Format</a>)
+00447 {
+00448 <span class="keywordflow">case</span> <a class="code" href="a05381.html#a80a17">Mono8</a>:
+00449 data8 = (<a class="code" href="a04558.html#a6">sint8</a>*) <a class="code" href="a04223.html#a637">data</a>;
+00450 data8 += <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr15">_SampleOffset</a>;
+00451 <span class="comment">// nldebug(" with data (Mono8) from %p to %p (sample : base = %p, size = %p)", data8, data8+nbSample, data, _SampleSize);</span>
+00452 <span class="keywordflow">for</span> (i=0; i&lt;nbSample; ++i)
+00453 {
+00454 dst[i] = <a class="code" href="a05167.html#a10">sint16</a>(data8[i])*256;
+00455 }
+00456 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr15">_SampleOffset</a> += nbSample;
+00457 <span class="keywordflow">break</span>;
+00458 <span class="keywordflow">case</span> <a class="code" href="a05381.html#a80a18">Mono16ADPCM</a>:
+00459 dataAdpcm = (<a class="code" href="a04558.html#a7">uint8</a>*) <a class="code" href="a04223.html#a637">data</a>;
+00460 dataAdpcm += <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr15">_SampleOffset</a>/2;
+00461 <span class="comment">//nldebug("Filling ADPCM : %p =&gt; %p with %p to %p", dst, dst+nbSample, dataAdpcm - (uint8*)data, dataAdpcm + (nbSample/2)-(uint8*)data);</span>
+00462 <span class="comment">//nldebug(" with data (Mono16ADPCM) from %p to %p (sample : base = %p, size = %p)", dataAdpcm, dataAdpcm+(nbSample/2), data, _SampleSize*2);</span>
+00463 IBuffer::decodeADPCM(dataAdpcm, dst, nbSample, _ADPCMState);
+00464 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr15">_SampleOffset</a> += nbSample;
+00465 <span class="keywordflow">break</span>;
+00466 <span class="keywordflow">case</span> <a class="code" href="a05381.html#a80a19">Mono16</a>:
+00467 data16 = (<a class="code" href="a04558.html#a8">sint16</a>*)<a class="code" href="a04223.html#a637">data</a>;
+00468 data16 += <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr15">_SampleOffset</a>;
+00469 <span class="comment">//nldebug("Filling Mono16 : %p =&gt; %p with %p to %p", dst, dst+nbSample, data16 - (sint16*)data, data16 + (nbSample)-(sint16*)data);</span>
+00470 <span class="comment">// nldebug(" with data (Mono16) from %p to %p (sample : base = %p, size = %p)", data16, data16+nbSample, data, _SampleSize/2);</span>
+00471 CFastMem::memcpy(dst, data16, nbSample*2);
+00472 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr15">_SampleOffset</a> += nbSample;
+00473 <span class="keywordflow">break</span>;
+00474 <span class="keywordflow">case</span> <a class="code" href="a05381.html#a80a20">Stereo8</a>:
+00475 data8 = (<a class="code" href="a04558.html#a6">sint8</a>*) <a class="code" href="a04223.html#a637">data</a>;
+00476 data8 += <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr15">_SampleOffset</a>*2;
+00477 <span class="keywordflow">for</span> (i=0; i&lt;nbSample; ++i)
+00478 {
+00479 dst[i] = (<a class="code" href="a05167.html#a10">sint16</a>(data8[i*2])*128) + (<a class="code" href="a05167.html#a10">sint16</a>(data8[i*2+1])*128);
+00480 }
+00481 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr15">_SampleOffset</a> += nbSample*2;
+00482 <span class="keywordflow">break</span>;
+00483 <span class="keywordflow">case</span> <a class="code" href="a05381.html#a80a21">Stereo16</a>:
+00484 data16 = (<a class="code" href="a04558.html#a8">sint16</a>*) <a class="code" href="a04223.html#a637">data</a>;
+00485 data16 += <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr15">_SampleOffset</a>*2;
+00486 <span class="keywordflow">for</span> (i=0; i&lt;nbSample; ++i)
+00487 {
+00488 dst[i] = (data16[i*2]&gt;&gt;1) + (data16[i*2+1]&gt;&gt;1);
+00489 }
+00490 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr15">_SampleOffset</a> += nbSample*2;
+00491 <span class="keywordflow">break</span>;
+00492 }
+00493
+00494 <span class="comment">/* if (_SampleOffset == _SampleSize)</span>
+00495 <span class="comment"> {</span>
+00496 <span class="comment"> _SampleOffset = 0;</span>
+00497 <span class="comment"> _ADPCMState.PreviousSample = 0;</span>
+00498 <span class="comment"> _ADPCMState.StepIndex = 0;</span>
+00499 <span class="comment"> }</span>
+00500 <span class="comment">*/</span>
+00501
+00502 <a class="code" href="a04199.html#a6">nlassert</a>(_SampleOffset &lt;= _SampleSize);
+00503 }
+00504 <span class="keywordflow">else</span>
+00505 {
+00506 <a class="code" href="a04199.html#a0">nldebug</a>(<span class="stringliteral">"Filling : NO DATA from %p to %p (%p sample, %p bytes)"</span>, dst, dst+nbSample, nbSample, nbSample*2);
+00507
+00508 <span class="comment">// write silence in the dst.</span>
+00509 <span class="keywordflow">while</span> (nbSample)
+00510 {
+00511 *dst++ = 0;
+00512 --nbSample;
+00513 }
+00514 }
+00515 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundd10" doxytag="NLSOUND::CSourceDSound::fillData" ></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::CSourceDSound::fillData </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03432.html">TLockedBufferInfo</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>lbi</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>int&nbsp;</td>
+ <td class="mdname" nowrap> <em>nbSample</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [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="a06429.html#l00517">517</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06430.html#l00308">NLSOUND::CSourceDSound::TLockedBufferInfo::Ptr1</a>, <a class="el" href="a06430.html#l00312">NLSOUND::CSourceDSound::TLockedBufferInfo::Ptr2</a>, <a class="el" href="a05646.html#l00645">size</a>, <a class="el" href="a06430.html#l00309">NLSOUND::CSourceDSound::TLockedBufferInfo::Size1</a>, <a class="el" href="a06430.html#l00313">NLSOUND::CSourceDSound::TLockedBufferInfo::Size2</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06590.html#l00219">uint32</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00688">play()</a>, and <a class="el" href="a06429.html#l01059">update()</a>.
+<p>
+<div class="fragment"><pre>00518 {
+00519 <a class="code" href="a04199.html#a6">nlassert</a>((nbSample &amp; 0x1) == 0);
+00520 <span class="comment">/* nlassert(lbi.Size1 != 0);</span>
+00521 <span class="comment"> nlassert(lbi.Ptr1 != NULL);</span>
+00522 <span class="comment">*/</span> <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a587">size</a> = <a class="code" href="a04061.html#a0">std::min</a>(<a class="code" href="a05167.html#a13">uint32</a>(nbSample), lbi.Size1&gt;&gt;1);
+00523 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd10">fillData</a>(lbi.Ptr1, size);
+00524 nbSample -= <a class="code" href="a04223.html#a587">size</a>;
+00525
+00526 <span class="keywordflow">if</span> (nbSample)
+00527 {
+00528 <span class="comment">/* nlassert(lbi.Size2 != 0);</span>
+00529 <span class="comment"> nlassert(lbi.Ptr2 != NULL);</span>
+00530 <span class="comment">*/</span> <a class="code" href="a04223.html#a587">size</a> = <a class="code" href="a04061.html#a0">min</a>(<a class="code" href="a05167.html#a13">uint32</a>(nbSample), lbi.Size2&gt;&gt;1);
+00531 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd10">fillData</a>(lbi.Ptr2, size);
+00532 nbSample -= <a class="code" href="a04223.html#a587">size</a>;
+00533 }
+00534 <a class="code" href="a04199.html#a6">nlassert</a>(nbSample == 0);
+00535 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundd11" doxytag="NLSOUND::CSourceDSound::fillSilence" ></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::CSourceDSound::fillSilence </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03432.html">TLockedBufferInfo</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>lbi</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>int&nbsp;</td>
+ <td class="mdname" nowrap> <em>nbSample</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [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="a06429.html#l00537">537</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06430.html#l00308">NLSOUND::CSourceDSound::TLockedBufferInfo::Ptr1</a>, <a class="el" href="a06430.html#l00312">NLSOUND::CSourceDSound::TLockedBufferInfo::Ptr2</a>, <a class="el" href="a05981.html#l00097">sint16</a>, <a class="el" href="a05646.html#l00645">size</a>, <a class="el" href="a06430.html#l00309">NLSOUND::CSourceDSound::TLockedBufferInfo::Size1</a>, <a class="el" href="a06430.html#l00313">NLSOUND::CSourceDSound::TLockedBufferInfo::Size2</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06590.html#l00219">uint32</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00688">play()</a>, <a class="el" href="a06429.html#l00827">stop()</a>, and <a class="el" href="a06429.html#l01059">update()</a>.
+<p>
+<div class="fragment"><pre>00538 {
+00539 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a587">size</a> = <a class="code" href="a04061.html#a0">min</a>(<a class="code" href="a05167.html#a13">uint32</a>(nbSample), lbi.Size1&gt;&gt;1);
+00540 <a class="code" href="a04558.html#a15">uint</a> tmp = <a class="code" href="a04223.html#a587">size</a>;
+00541 <a class="code" href="a04558.html#a8">sint16</a> *ptr = lbi.Ptr1;
+00542 <span class="comment">// nldebug("Silencing from %p to %p (%p sample, %p bytes)", ptr, ptr+size, size, size*2);</span>
+00543
+00544 <span class="keywordflow">for</span> (; <a class="code" href="a04223.html#a587">size</a> != 0; --<a class="code" href="a04223.html#a587">size</a>)
+00545 *ptr++ = 0;
+00546 nbSample -= tmp;
+00547
+00548 <span class="keywordflow">if</span> (nbSample)
+00549 {
+00550 <a class="code" href="a04223.html#a587">size</a> = <a class="code" href="a04061.html#a0">std::min</a>(<a class="code" href="a05167.html#a13">uint32</a>(nbSample), lbi.Size2&gt;&gt;1);
+00551 tmp = <a class="code" href="a04223.html#a587">size</a>;
+00552 ptr = lbi.Ptr2;
+00553 <span class="comment">// nldebug("Silencing from %p to %p (%p sample, %p bytes)", ptr, ptr+size, size, size*2);</span>
+00554 <span class="keywordflow">for</span> (; <a class="code" href="a04223.html#a587">size</a> != 0; --<a class="code" href="a04223.html#a587">size</a>)
+00555 *ptr++ = 0;
+00556 nbSample -= tmp;
+00557 }
+00558 <a class="code" href="a04199.html#a6">nlassert</a>(nbSample == 0);
+00559
+00560 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSounda1" doxytag="NLSOUND::CSourceDSound::getBuffer" ></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::CSourceDSound::getBuffer </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>
+Returns the buffer associated with this source.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06429.html#l01803">1803</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00374">_Sample</a>.
+<p>
+<div class="fragment"><pre>01804 {
+01805 <span class="keywordflow">return</span> <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">_Sample</a>;
+01806 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1314_0" doxytag="NLSOUND::CSourceDSound::getCone" ></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::CSourceDSound::getCone </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>innerAngle</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>outerAngle</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>outerGain</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Get the cone angles (in radian).
+<p>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1334_0">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l01745">1745</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00413">_3DBuffer</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, and <a class="el" href="a05587.html#l00079">NLMISC::Pi</a>.
+<p>
+<div class="fragment"><pre>01746 {
+01747 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a> != 0)
+01748 {
+01749 DWORD inner, outer;
+01750 LONG volume;
+01751
+01752 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a>-&gt;GetConeAngles(&amp;inner, &amp;outer) != DS_OK)
+01753 {
+01754 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"GetConeAngles failed"</span>);
+01755 innerAngle = outerAngle = (<span class="keywordtype">float</span>)(2.0 * <a class="code" href="a05378.html#a44">Pi</a>);
+01756 }
+01757 <span class="keywordflow">else</span>
+01758 {
+01759 innerAngle = (<span class="keywordtype">float</span>)(<a class="code" href="a05378.html#a44">Pi</a> * inner / 180.0);
+01760 outerAngle = (<span class="keywordtype">float</span>)(<a class="code" href="a05378.html#a44">Pi</a> * outer / 180.0);
+01761 }
+01762
+01763 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a>-&gt;GetConeOutsideVolume(&amp;volume) != DS_OK)
+01764 {
+01765 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"GetConeOutsideVolume failed"</span>);
+01766 outerGain = 0.0f;
+01767 }
+01768 <span class="keywordflow">else</span>
+01769 {
+01770 outerGain = (<span class="keywordtype">float</span>) pow(10, (<span class="keywordtype">double</span>) volume / 20.0 / 100.0);
+01771 }
+01772 }
+01773 <span class="keywordflow">else</span>
+01774 {
+01775 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"Requested getCone on a non-3D source"</span>);
+01776 }
+01777 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundd12" doxytag="NLSOUND::CSourceDSound::getCursors" ></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::CSourceDSound::getCursors </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03431.html">TCursors</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>cursors</em> </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>
+
+<p>
+Definition at line <a class="el" href="a06429.html#l00419">419</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00407">_SecondaryBuffer</a>, <a class="el" href="a06429.html#l00071">_SizeMask</a>, <a class="el" href="a06429.html#l00073">_UpdateCopySize</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a06430.html#l00299">NLSOUND::CSourceDSound::TCursors::PlayCursor</a>, <a class="el" href="a06430.html#l00300">NLSOUND::CSourceDSound::TCursors::WriteCursor</a>, and <a class="el" href="a06430.html#l00301">NLSOUND::CSourceDSound::TCursors::WriteSize</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00688">play()</a>, <a class="el" href="a06429.html#l00827">stop()</a>, and <a class="el" href="a06429.html#l01059">update()</a>.
+<p>
+<div class="fragment"><pre>00420 {
+00421 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a>-&gt;GetCurrentPosition((DWORD*)&amp;cursors.PlayCursor, (DWORD*)&amp;cursors.WriteCursor);
+00422 <span class="comment">// add a security margin to the write cursor</span>
+00423 <span class="comment">/* cursors.WriteCursor += _UpdateCopySize;</span>
+00424 <span class="comment"> if (cursors.WriteCursor &gt; _SecondaryBufferSize)</span>
+00425 <span class="comment"> cursors.WriteCursor -= _SecondaryBufferSize;</span>
+00426 <span class="comment">*/</span>
+00427 <span class="comment">// compute the available write size</span>
+00428 <span class="comment">// cursors.WriteSize = std::min(_UpdateCopySize, cursors.PlayCursor + _SecondaryBufferSize - cursors.WriteCursor);</span>
+00429 cursors.WriteSize = <a class="code" href="a04061.html#a0">std::min</a>(_UpdateCopySize, (cursors.PlayCursor - cursors.WriteCursor) &amp; _SizeMask);
+00430 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1314_1" doxytag="NLSOUND::CSourceDSound::getDirection" ></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::CSourceDSound::getDirection </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03128.html">NLMISC::CVector</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>dir</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Get the direction vector.
+<p>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1334_1">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l01398">1398</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00413">_3DBuffer</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a06682.html#l00136">NLMISC::CVector::set()</a>, and <a class="el" href="a05646.html#l00237">v</a>.
+<p>
+<div class="fragment"><pre>01399 {
+01400 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a> != NULL)
+01401 {
+01402 D3DVECTOR <a class="code" href="a04223.html#a576">v</a>;
+01403
+01404 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a>-&gt;GetConeOrientation(&amp;v) != DS_OK)
+01405 {
+01406 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"GetConeOrientation failed"</span>);
+01407 dir.<a class="code" href="a03128.html#NLMISC_1_1CVectorz2051_8">set</a>(0, 0, 1);
+01408 }
+01409 <span class="keywordflow">else</span>
+01410 {
+01411 dir.<a class="code" href="a03128.html#NLMISC_1_1CVectorz2051_8">set</a>(<a class="code" href="a04223.html#a576">v</a>.x, <a class="code" href="a04223.html#a576">v</a>.z, <a class="code" href="a04223.html#a576">v</a>.y);
+01412 }
+01413 }
+01414 <span class="keywordflow">else</span>
+01415 {
+01416 dir.<a class="code" href="a03128.html#NLMISC_1_1CVectorz2051_8">set</a>(0, 0, 1);
+01417 }
+01418 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1314_2" doxytag="NLSOUND::CSourceDSound::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::CSourceDSound::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> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Get the gain.
+<p>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1334_2">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l01446">1446</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+<div class="fragment"><pre>01447 {
+01448 <span class="keywordflow">return</span> <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr7">_Gain</a>;
+01449 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1312_0" doxytag="NLSOUND::CSourceDSound::getLooping" ></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::CSourceDSound::getLooping </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> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Return the looping state.
+<p>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1332_0">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l00874">874</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00401">_Loop</a>.
+<p>
+<div class="fragment"><pre>00875 {
+00876 <span class="keywordflow">return</span> <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr9">_Loop</a>;
+00877 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1314_3" doxytag="NLSOUND::CSourceDSound::getMinMaxDistances" ></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::CSourceDSound::getMinMaxDistances </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>mindist</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>maxdist</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Get the min and max distances.
+<p>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1334_3">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l01580">1580</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00413">_3DBuffer</a>, <a class="el" href="a05484.html#l00038">min</a>, and <a class="el" href="a05622.html#l00135">nlwarning</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l01608">updateVolume()</a>.
+<p>
+<div class="fragment"><pre>01581 {
+01582 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a> != 0)
+01583 {
+01584 D3DVALUE <a class="code" href="a04061.html#a0">min</a>, max;
+01585
+01586 <span class="keywordflow">if</span> ((<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a>-&gt;GetMinDistance(&amp;min) != DS_OK)
+01587 || (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a>-&gt;GetMaxDistance(&amp;max) != DS_OK))
+01588 {
+01589 mindist = 0.0f;
+01590 maxdist = 0.0f;
+01591 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"GetMinDistance or GetMaxDistance failed"</span>);
+01592 }
+01593 <span class="keywordflow">else</span>
+01594 {
+01595 mindist = <a class="code" href="a04061.html#a0">min</a>;
+01596 maxdist = max;
+01597 }
+01598 }
+01599 <span class="keywordflow">else</span>
+01600 {
+01601 mindist = 0.0f;
+01602 maxdist = 0.0f;
+01603 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"Requested getMinMaxDistances on a non-3D source"</span>);
+01604 }
+01605 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1314_4" doxytag="NLSOUND::CSourceDSound::getPitch" ></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::CSourceDSound::getPitch </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> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Get the pitch.
+<p>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1334_4">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l01480">1480</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00374">_Sample</a>, <a class="el" href="a06430.html#l00407">_SecondaryBuffer</a>, <a class="el" href="a05646.html#l01016">format</a>, <a class="el" href="a02298.html#NLSOUND_1_1IBuffera3">NLSOUND::IBuffer::getFormat()</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a06417.html#l00098">NLSOUND::TSampleFormat</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>01481 {
+01482 <span class="keywordflow">if</span> ((<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">_Sample</a> != 0) &amp;&amp; (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a> != 0))
+01483 {
+01484 <a class="code" href="a05381.html#a80">TSampleFormat</a> <a class="code" href="a04223.html#a641">format</a>;
+01485 <a class="code" href="a04558.html#a15">uint</a> freq0;
+01486 DWORD freq;
+01487
+01488 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">_Sample</a>-&gt;getFormat(format, freq0);
+01489
+01490 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a>-&gt;GetFrequency(&amp;freq) != DS_OK)
+01491 {
+01492 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"GetFrequency failed"</span>);
+01493 <span class="keywordflow">return</span> 1.0;
+01494 }
+01495
+01496 <span class="keywordflow">return</span> ((<span class="keywordtype">float</span>) freq / (<span class="keywordtype">float</span>) freq0);
+01497 }
+01498
+01499 <span class="keywordflow">return</span> 1.0;
+01500 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1314_5" doxytag="NLSOUND::CSourceDSound::getPos" ></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="a03128.html">NLMISC::CVector</a> &amp; NLSOUND::CSourceDSound::getPos </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> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Get the position vector. See <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundz1314_14">setPos()</a> for details.
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1334_5">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l01333">1333</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l01608">updateVolume()</a>.
+<p>
+<div class="fragment"><pre>01334 {
+01335 <span class="keywordflow">return</span> <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr12">_Pos</a>;
+01336 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1314_6" doxytag="NLSOUND::CSourceDSound::getSourceRelativeMode" ></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::CSourceDSound::getSourceRelativeMode </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> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Get the source relative mode.
+<p>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1334_6">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l01534">1534</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00413">_3DBuffer</a>, and <a class="el" href="a05622.html#l00135">nlwarning</a>.
+<p>
+<div class="fragment"><pre>01535 {
+01536 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a> != 0)
+01537 {
+01538 DWORD mode;
+01539
+01540 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a>-&gt;GetMode(&amp;mode) != DS_OK)
+01541 {
+01542 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"GetMode failed"</span>);
+01543 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+01544 }
+01545
+01546 <span class="keywordflow">return</span> (mode == DS3DMODE_HEADRELATIVE);
+01547 }
+01548 <span class="keywordflow">else</span>
+01549 {
+01550 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"Requested setSourceRelativeMode on a non-3D source"</span>);
+01551 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+01552 }
+01553 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1310_0" doxytag="NLSOUND::CSourceDSound::getStaticBuffer" ></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::CSourceDSound::getStaticBuffer </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 buffer, or NULL if streaming is used.
+<p>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1330_0">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l00409">409</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00391">_NextSample</a>, <a class="el" href="a06430.html#l00374">_Sample</a>, <a class="el" href="a06430.html#l00368">_State</a>, and <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy3">source_swap_pending</a>.
+<p>
+<div class="fragment"><pre>00410 {
+00411 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> == <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy3">source_swap_pending</a>)
+00412 <span class="keywordflow">return</span> <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr10">_NextSample</a>;
+00413 <span class="keywordflow">else</span>
+00414 <span class="keywordflow">return</span> <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">_Sample</a>;
+00415
+00416 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1312_1" doxytag="NLSOUND::CSourceDSound::getTime" ></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> NLSOUND::CSourceDSound::getTime </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>
+Returns the number of milliseconds the source has been playing.
+<p>
+Update the source (e.g. continue to stream the data in) Returns an indication whether the source actually streamed data or not.
+<p>
+Reimplemented from <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1332_1">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l00203">203</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00380">_PlayOffset</a>, <a class="el" href="a06430.html#l00374">_Sample</a>, <a class="el" href="a05646.html#l01016">format</a>, <a class="el" href="a02298.html#NLSOUND_1_1IBuffera3">NLSOUND::IBuffer::getFormat()</a>, <a class="el" href="a06417.html#l00098">NLSOUND::TSampleFormat</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>00204 {
+00205 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">_Sample</a> == 0)
+00206 <span class="keywordflow">return</span> 0;
+00207
+00208 <a class="code" href="a05381.html#a80">TSampleFormat</a> <a class="code" href="a04223.html#a641">format</a>;
+00209 <a class="code" href="a04558.html#a15">uint</a> freq;
+00210
+00211 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">_Sample</a>-&gt;getFormat(format, freq);
+00212
+00213 <span class="keywordflow">return</span> <a class="code" href="a05167.html#a13">uint32</a>(1000.0f * (_PlayOffset+1) / (<span class="keywordtype">float</span>)freq);
+00214 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1314_7" doxytag="NLSOUND::CSourceDSound::getVelocity" ></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::CSourceDSound::getVelocity </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03128.html">NLMISC::CVector</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>vel</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Get the velocity vector.
+<p>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1334_7">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l01355">1355</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00413">_3DBuffer</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a06682.html#l00136">NLMISC::CVector::set()</a>, and <a class="el" href="a05646.html#l00237">v</a>.
+<p>
+<div class="fragment"><pre>01356 {
+01357 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a> != NULL)
+01358 {
+01359 D3DVECTOR <a class="code" href="a04223.html#a576">v</a>;
+01360
+01361 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a>-&gt;GetVelocity(&amp;v) != DS_OK)
+01362 {
+01363 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"GetVelocity failed"</span>);
+01364 vel.<a class="code" href="a03128.html#NLMISC_1_1CVectorz2051_8">set</a>(0, 0, 0);
+01365 }
+01366 <span class="keywordflow">else</span>
+01367 {
+01368 vel.<a class="code" href="a03128.html#NLMISC_1_1CVectorz2051_8">set</a>(<a class="code" href="a04223.html#a576">v</a>.x, <a class="code" href="a04223.html#a576">v</a>.z, <a class="code" href="a04223.html#a576">v</a>.y);
+01369 }
+01370 }
+01371 <span class="keywordflow">else</span>
+01372 {
+01373 vel.<a class="code" href="a03128.html#NLMISC_1_1CVectorz2051_8">set</a>(0, 0, 0);
+01374 }
+01375 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSounda2" doxytag="NLSOUND::CSourceDSound::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"> void NLSOUND::CSourceDSound::init </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">LPDIRECTSOUND8&nbsp;</td>
+ <td class="mdname" nowrap> <em>directSound</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></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Initialize the DirectSound buffers. Called by the sound driver only.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06429.html#l00218">218</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00413">_3DBuffer</a>, <a class="el" href="a06429.html#l00075">_DefaultChannels</a>, <a class="el" href="a06429.html#l00076">_DefaultSampleRate</a>, <a class="el" href="a06429.html#l00077">_DefaultSampleSize</a>, <a class="el" href="a06430.html#l00407">_SecondaryBuffer</a>, <a class="el" href="a06429.html#l00070">_SecondaryBufferSize</a>, <a class="el" href="a06420.html#l00779">NLSOUND::CSoundDriverDSound::countHw2DBuffers()</a>, <a class="el" href="a06420.html#l00764">NLSOUND::CSoundDriverDSound::countHw3DBuffers()</a>, <a class="el" href="a05646.html#l01016">format</a>, <a class="el" href="a05622.html#l00101">nldebug</a>, and <a class="el" href="a05622.html#l00135">nlwarning</a>.
+<p>
+<div class="fragment"><pre>00219 {
+00220
+00221 <span class="comment">// Initialize the buffer format</span>
+00222 WAVEFORMATEX <a class="code" href="a04223.html#a641">format</a>;
+00223
+00224 <a class="code" href="a04223.html#a641">format</a>.cbSize = <span class="keyword">sizeof</span>(WAVEFORMATEX);
+00225 <a class="code" href="a04223.html#a641">format</a>.nChannels = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv0">_DefaultChannels</a>;
+00226 <a class="code" href="a04223.html#a641">format</a>.wBitsPerSample = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv2">_DefaultSampleSize</a>;
+00227 <a class="code" href="a04223.html#a641">format</a>.nSamplesPerSec = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv1">_DefaultSampleRate</a>;
+00228 <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;
+00229 <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;
+00230 <a class="code" href="a04223.html#a641">format</a>.wFormatTag = WAVE_FORMAT_PCM;
+00231
+00232
+00233 <span class="comment">// Initialize the buffer description </span>
+00234
+00235 DSBUFFERDESC desc;
+00236
+00237 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundn0">CSoundDriverDSound</a>* driver = CSoundDriverDSound::instance();
+00238
+00239
+00240 ZeroMemory(&amp;desc, <span class="keyword">sizeof</span>(DSBUFFERDESC));
+00241 desc.dwSize = <span class="keyword">sizeof</span>(DSBUFFERDESC);
+00242 desc.lpwfxFormat = &amp;<a class="code" href="a04223.html#a641">format</a>;
+00243 desc.dwBufferBytes = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv3">_SecondaryBufferSize</a>;
+00244 desc.dwReserved = 0;
+00245
+00246 <span class="keywordflow">if</span> (driver-&gt;countHw3DBuffers() &gt; 0)
+00247 {
+00248 <span class="comment">//nldebug("Source: Allocating 3D buffer in hardware");</span>
+00249 desc.dwFlags = DSBCAPS_GLOBALFOCUS | DSBCAPS_LOCHARDWARE | DSBCAPS_GETCURRENTPOSITION2
+00250 | DSBCAPS_CTRL3D | DSBCAPS_CTRLVOLUME | DSBCAPS_CTRLFREQUENCY | DSBCAPS_MUTE3DATMAXDISTANCE;
+00251 }
+00252 <span class="keywordflow">else</span>
+00253 {
+00254 <span class="keywordflow">if</span> (useEax)
+00255 {
+00256 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"No 3d hardware sound buffer, but EAX support requested"</span>);
+00257 }
+00258 <span class="comment">//nldebug("Source: Allocating 3D buffer in software");</span>
+00259 desc.dwFlags = DSBCAPS_GLOBALFOCUS | DSBCAPS_LOCSOFTWARE | DSBCAPS_GETCURRENTPOSITION2
+00260 | DSBCAPS_CTRL3D | DSBCAPS_CTRLVOLUME | DSBCAPS_CTRLFREQUENCY | DSBCAPS_MUTE3DATMAXDISTANCE;
+00261 desc.guid3DAlgorithm = DS3DALG_NO_VIRTUALIZATION;
+00262 <span class="comment">//desc.guid3DAlgorithm = DS3DALG_HRTF_FULL;</span>
+00263 }
+00264
+00265
+00266 <span class="comment">// Allocate the secondary buffer</span>
+00267
+00268 <span class="keywordflow">if</span> (FAILED(directSound-&gt;CreateSoundBuffer(&amp;desc, &amp;_SecondaryBuffer, NULL)))
+00269 {
+00270 <span class="keywordflow">if</span> (useEax)
+00271 {
+00272 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Failed to create a 3d hardware sound buffer, but EAX support requested"</span>);
+00273 }
+00274 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"Source: Failed to create a buffer with 3D capabilities."</span>);
+00275
+00276 ZeroMemory(&amp;desc, <span class="keyword">sizeof</span>(DSBUFFERDESC));
+00277 desc.dwSize = <span class="keyword">sizeof</span>(DSBUFFERDESC);
+00278 desc.lpwfxFormat = &amp;<a class="code" href="a04223.html#a641">format</a>;
+00279 desc.dwBufferBytes = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv3">_SecondaryBufferSize</a>;
+00280 desc.dwReserved = 0;
+00281
+00282 <span class="keywordflow">if</span> (driver-&gt;countHw2DBuffers() &gt; 0)
+00283 {
+00284 <span class="comment">//nldebug("Source: Allocating 2D buffer in hardware");</span>
+00285 desc.dwFlags = DSBCAPS_GLOBALFOCUS | DSBCAPS_LOCHARDWARE | DSBCAPS_GETCURRENTPOSITION2 | DSBCAPS_CTRLVOLUME | DSBCAPS_CTRLFREQUENCY;
+00286 }
+00287 <span class="keywordflow">else</span>
+00288 {
+00289 <span class="comment">//nldebug("Source: Allocating 2D buffer in software");</span>
+00290 desc.dwFlags = DSBCAPS_GLOBALFOCUS | DSBCAPS_LOCSOFTWARE | DSBCAPS_GETCURRENTPOSITION2 | DSBCAPS_CTRLVOLUME | DSBCAPS_CTRLFREQUENCY;
+00291 }
+00292
+00293 <span class="keywordflow">if</span> (FAILED(directSound-&gt;CreateSoundBuffer(&amp;desc, &amp;_SecondaryBuffer, NULL)))
+00294 {
+00295 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Failed to allocate the DirectSound secondary buffer"</span>);
+00296 }
+00297 }
+00298
+00299
+00300 <a class="code" href="a04199.html#a0">nldebug</a>(<span class="stringliteral">"Created DirectX secondary buffer @ %p"</span>, _SecondaryBuffer);
+00301
+00302 <span class="comment">// Fill the buffer with silence</span>
+00303 LPVOID ptr;
+00304 DWORD bytes;
+00305
+00306 <span class="keywordflow">if</span> (FAILED(<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a>-&gt;Lock(0, 0, &amp;ptr, &amp;bytes, NULL, NULL, DSBLOCK_ENTIREBUFFER)))
+00307 {
+00308 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Failed to lock the DirectSound secondary buffer"</span>);
+00309 }
+00310
+00311 memset(ptr, 0, bytes);
+00312
+00313 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a>-&gt;Unlock(ptr, bytes, 0, 0);
+00314
+00315 <span class="comment">// Allocate the 3D interface, if necessary</span>
+00316
+00317 <span class="keywordflow">if</span> (FAILED(<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a>-&gt;QueryInterface(IID_IDirectSound3DBuffer, (LPVOID *) &amp;_3DBuffer)))
+00318 {
+00319 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Failed to allocate the DirectSound 3D buffer"</span>);
+00320 }
+00321
+00322
+00323 <span class="keywordflow">if</span> (FAILED(<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a>-&gt;Play(0, 0, DSBPLAY_LOOPING)))
+00324 {
+00325 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Play failed"</span>);
+00326 }
+00327
+00328 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1312_2" doxytag="NLSOUND::CSourceDSound::isPaused" ></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::CSourceDSound::isPaused </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> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Return the paused state.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06429.html#l01030">1030</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a05622.html#l00290">nlassert</a>.
+<p>
+<div class="fragment"><pre>01031 {
+01032 <span class="comment">// TODO</span>
+01033 <a class="code" href="a04199.html#a6">nlassert</a>(<span class="keyword">false</span>);
+01034 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+01035 <span class="comment">// return (_UserState == NL_DSOUND_PAUSED);</span>
+01036 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1312_3" doxytag="NLSOUND::CSourceDSound::isPlaying" ></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::CSourceDSound::isPlaying </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> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Return the playing state.
+<p>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1332_2">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l01021">1021</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00368">_State</a>, <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy0">source_playing</a>, and <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy3">source_swap_pending</a>.
+<p>
+<div class="fragment"><pre>01022 {
+01023 <span class="comment">// return (_UserState == NL_DSOUND_PLAYING);</span>
+01024 <span class="keywordflow">return</span> <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> == <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy0">source_playing</a> || <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> == <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy3">source_swap_pending</a>;
+01025 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1312_4" doxytag="NLSOUND::CSourceDSound::isStopped" ></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::CSourceDSound::isStopped </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> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Return true if playing is finished or <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundz1312_8">stop()</a> has been called.
+<p>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1332_3">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l01041">1041</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00368">_State</a>, <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy1">source_silencing</a>, and <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy2">source_stoped</a>.
+<p>
+<div class="fragment"><pre>01042 {
+01043 <span class="keywordflow">return</span> <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> == <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy1">source_silencing</a> || <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> == <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy2">source_stoped</a>;
+01044 <span class="comment">// return (_UserState == NL_DSOUND_STOPPED);</span>
+01045 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundd13" doxytag="NLSOUND::CSourceDSound::lock" ></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::CSourceDSound::lock </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>writePos</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>size</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03432.html">TLockedBufferInfo</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>lockedInfo</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [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="a06429.html#l01811">1811</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00407">_SecondaryBuffer</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a05646.html#l00645">offset</a>, <a class="el" href="a06430.html#l00308">NLSOUND::CSourceDSound::TLockedBufferInfo::Ptr1</a>, <a class="el" href="a06430.html#l00312">NLSOUND::CSourceDSound::TLockedBufferInfo::Ptr2</a>, <a class="el" href="a05646.html#l00645">size</a>, <a class="el" href="a06430.html#l00309">NLSOUND::CSourceDSound::TLockedBufferInfo::Size1</a>, <a class="el" href="a06430.html#l00313">NLSOUND::CSourceDSound::TLockedBufferInfo::Size2</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00688">play()</a>, <a class="el" href="a06429.html#l00827">stop()</a>, and <a class="el" href="a06429.html#l01059">update()</a>.
+<p>
+<div class="fragment"><pre>01812 {
+01813 HRESULT hr = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a>-&gt;Lock(offset, size, (LPVOID*) &amp;lbi.Ptr1, (DWORD*) &amp;lbi.Size1, (LPVOID*) &amp;lbi.Ptr2, (DWORD*) &amp;lbi.Size2, 0);
+01814
+01815 <span class="keywordflow">if</span> (hr == DSERR_BUFFERLOST)
+01816 {
+01817 <span class="comment">// If the buffer got lost somehow, try to restore it.</span>
+01818 <span class="keywordflow">if</span> (FAILED(<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a>-&gt;Restore()))
+01819 {
+01820 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"Lock failed (1)"</span>);
+01821 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+01822 }
+01823 <span class="keywordflow">if</span> (FAILED(<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a>-&gt;Lock(offset, size, (LPVOID*) &amp;lbi.Ptr1, (DWORD*)&amp;lbi.Size1, (LPVOID*) &amp;lbi.Ptr2, (DWORD*)&amp;lbi.Size2, 0)))
+01824 {
+01825 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"Lock failed (2)"</span>);
+01826 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+01827 }
+01828 }
+01829 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (hr != DS_OK)
+01830 {
+01831 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"Lock failed (3)"</span>);
+01832 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+01833 }
+01834
+01835 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+01836 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundd14" doxytag="NLSOUND::CSourceDSound::needsUpdate" ></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::CSourceDSound::needsUpdate </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>
+Check whether the play position has advanced enough to require an update.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06429.html#l01050">1050</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00368">_State</a>, <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy0">source_playing</a>, <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy1">source_silencing</a>, and <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy3">source_swap_pending</a>.
+<p>
+<div class="fragment"><pre>01051 {
+01052 <span class="keywordflow">return</span> <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> == <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy1">source_silencing</a> || <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> == <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy0">source_playing</a> || <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> == <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy3">source_swap_pending</a>;
+01053 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1312_5" doxytag="NLSOUND::CSourceDSound::pause" ></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::CSourceDSound::pause </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>
+Pause. Call <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundz1312_6">play()</a> to resume.
+<p>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1332_4">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l00997">997</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a05622.html#l00290">nlassert</a>.
+<p>
+<div class="fragment"><pre>00998 {
+00999 <span class="comment">// TODO : recode this !</span>
+01000 <a class="code" href="a04199.html#a6">nlassert</a>(<span class="keyword">false</span>);
+01001 <span class="comment">/* EnterCriticalSection(&amp;_CriticalSection); </span>
+01002 <span class="comment"></span>
+01003 <span class="comment"> TSourceDSoundUserState old = _UserState;</span>
+01004 <span class="comment"></span>
+01005 <span class="comment"> _UserState = NL_DSOUND_PAUSED;</span>
+01006 <span class="comment"> DBGPOS(("[%p] PAUZ: PAUSED", this));</span>
+01007 <span class="comment"></span>
+01008 <span class="comment"> //nldebug ("NLOUND: pause %p", this);</span>
+01009 <span class="comment"></span>
+01010 <span class="comment"> if (old == NL_DSOUND_PLAYING)</span>
+01011 <span class="comment"> {</span>
+01012 <span class="comment"> fadeOut();</span>
+01013 <span class="comment"> }</span>
+01014 <span class="comment"></span>
+01015 <span class="comment"> LeaveCriticalSection(&amp;_CriticalSection); </span>
+01016 <span class="comment">*/</span>
+01017 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1312_6" doxytag="NLSOUND::CSourceDSound::play" ></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::CSourceDSound::play </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>
+Play the static buffer (or stream in and play).
+<p>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1332_5">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l00688">688</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00418">_ADPCMState</a>, <a class="el" href="a06430.html#l00415">_CriticalSection</a>, <a class="el" href="a06430.html#l00394">_FillOffset</a>, <a class="el" href="a06430.html#l00393">_LastPlayPos</a>, <a class="el" href="a06430.html#l00401">_Loop</a>, <a class="el" href="a06430.html#l00391">_NextSample</a>, <a class="el" href="a06430.html#l00380">_PlayOffset</a>, <a class="el" href="a06430.html#l00374">_Sample</a>, <a class="el" href="a06430.html#l00382">_SampleFreq</a>, <a class="el" href="a06430.html#l00378">_SampleOffset</a>, <a class="el" href="a06430.html#l00376">_SampleSize</a>, <a class="el" href="a06430.html#l00395">_SilenceWriten</a>, <a class="el" href="a06430.html#l00368">_State</a>, <a class="el" href="a06429.html#l00074">_XFadeSize</a>, <a class="el" href="a06429.html#l00662">advanceFill()</a>, <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundd4">fadeIn()</a>, <a class="el" href="a06429.html#l00517">fillData()</a>, <a class="el" href="a06429.html#l00537">fillSilence()</a>, <a class="el" href="a06429.html#l00419">getCursors()</a>, <a class="el" href="a02298.html#NLSOUND_1_1IBuffera3">NLSOUND::IBuffer::getFormat()</a>, <a class="el" href="a05919.html#l00125">NLSOUND::CListenerDSound::getPos()</a>, <a class="el" href="a02298.html#NLSOUND_1_1IBuffera5">NLSOUND::IBuffer::getSize()</a>, <a class="el" href="a06429.html#l01811">lock()</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a05381.html#a80a19">NLSOUND::Mono16</a>, <a class="el" href="a05381.html#a80a18">NLSOUND::Mono16ADPCM</a>, <a class="el" href="a05381.html#a80a17">NLSOUND::Mono8</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a06430.html#l00299">NLSOUND::CSourceDSound::TCursors::PlayCursor</a>, <a class="el" href="a05517.html#l00092">NLSOUND::IBuffer::TADPCMState::PreviousSample</a>, <a class="el" href="a05981.html#l00097">sint16</a>, <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy0">source_playing</a>, <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy1">source_silencing</a>, <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy3">source_swap_pending</a>, <a class="el" href="a05517.html#l00094">NLSOUND::IBuffer::TADPCMState::StepIndex</a>, <a class="el" href="a05381.html#a80a21">NLSOUND::Stereo16</a>, <a class="el" href="a05381.html#a80a20">NLSOUND::Stereo8</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06429.html#l01868">unlock()</a>, <a class="el" href="a06429.html#l01608">updateVolume()</a>, <a class="el" href="a06430.html#l00300">NLSOUND::CSourceDSound::TCursors::WriteCursor</a>, <a class="el" href="a06430.html#l00301">NLSOUND::CSourceDSound::TCursors::WriteSize</a>, and <a class="el" href="a06429.html#l00562">xfade()</a>.
+<p>
+<div class="fragment"><pre>00689 {
+00690 <span class="comment">// nldebug("Play");</span>
+00691 EnterCriticalSection(&amp;_CriticalSection);
+00692
+00693 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr19">_SilenceWriten</a> = 0;
+00694
+00695 <span class="comment">// uint32 writeSize = checkFillCursor();</span>
+00696 TCursors cursors;
+00697 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd12">getCursors</a>(cursors);
+00698
+00699 <span class="comment">// set a new filling point</span>
+00700 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr4">_FillOffset</a> = cursors.WriteCursor;
+00701 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr4">_FillOffset</a> = (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr4">_FillOffset</a>+3) &amp; 0xfffffffC;
+00702 cursors.WriteCursor = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr4">_FillOffset</a>;
+00703
+00704 TLockedBufferInfo lbi;
+00705 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd13">lock</a>(_FillOffset, cursors.WriteSize, lbi))
+00706 {
+00707 TLockedBufferInfo unlockInfo(lbi);
+00708 <span class="comment">// ok, the buffer is locked, write data</span>
+00709 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> == <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy3">source_swap_pending</a>)
+00710 {
+00711 <span class="comment">// we swap the buffer.</span>
+00712 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">_Sample</a> = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr10">_NextSample</a>;
+00713 _NextSample = 0;
+00714 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">_Sample</a> != 0)
+00715 {
+00716 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">_Sample</a>-&gt;getFormat(_Format, _SampleFreq);
+00717 <span class="keywordflow">switch</span>(<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr5">_Format</a>)
+00718 {
+00719 <span class="keywordflow">case</span> <a class="code" href="a05381.html#a80a17">Mono8</a>:
+00720 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr17">_SampleSize</a> = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">_Sample</a>-&gt;getSize();
+00721 <span class="keywordflow">break</span>;
+00722 <span class="keywordflow">case</span> <a class="code" href="a05381.html#a80a19">Mono16</a>:
+00723 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr17">_SampleSize</a> = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">_Sample</a>-&gt;getSize() / 2;
+00724 <span class="keywordflow">break</span>;
+00725 <span class="keywordflow">case</span> <a class="code" href="a05381.html#a80a18">Mono16ADPCM</a>:
+00726 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr17">_SampleSize</a> = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">_Sample</a>-&gt;getSize() * 2;
+00727 <span class="keywordflow">break</span>;
+00728 <span class="keywordflow">case</span> <a class="code" href="a05381.html#a80a20">Stereo8</a>:
+00729 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr17">_SampleSize</a> = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">_Sample</a>-&gt;getSize() / 2;
+00730 <span class="keywordflow">break</span>;
+00731 <span class="keywordflow">case</span> <a class="code" href="a05381.html#a80a21">Stereo16</a>:
+00732 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr17">_SampleSize</a> = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">_Sample</a>-&gt;getSize() / 4;
+00733 <span class="keywordflow">break</span>;
+00734 }
+00735 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy0">source_playing</a>;
+00736 }
+00737 <span class="keywordflow">else</span>
+00738 {
+00739 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr17">_SampleSize</a> = 0;
+00740 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy1">source_silencing</a>;
+00741 }
+00742 }
+00743 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr8">_LastPlayPos</a> = cursors.PlayCursor;
+00744 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr15">_SampleOffset</a> = 0;
+00745 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr11">_PlayOffset</a> = 0;
+00746 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr1">_ADPCMState</a>.PreviousSample = 0;
+00747 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr1">_ADPCMState</a>.StepIndex = 0;
+00748 <span class="comment">// Compute the size of data to write.</span>
+00749 <a class="code" href="a04558.html#a15">uint</a> dataToFill = <a class="code" href="a04061.html#a0">std::min</a>(<a class="code" href="a05167.html#a17">uint</a>(cursors.WriteSize / 2), _SampleSize - _SampleOffset);
+00750 dataToFill &amp;= 0xfffffffe;
+00751 <span class="comment">// ok, the buffer is locked, write data</span>
+00752 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> == <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy0">source_playing</a> || <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> == <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy1">source_silencing</a>)
+00753 {
+00754 <span class="comment">// we need a little XFade</span>
+00755 <a class="code" href="a04558.html#a8">sint16</a> fadeBuffer[<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv7">_XFadeSize</a>];
+00756 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd10">fillData</a>(fadeBuffer, _XFadeSize);
+00757 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd19">xfade</a>(lbi, fadeBuffer);
+00758 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd0">advanceFill</a>(lbi, _XFadeSize);
+00759 cursors.WriteSize -= <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv7">_XFadeSize</a>*2;
+00760 dataToFill -= <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv7">_XFadeSize</a>;
+00761 }
+00762 <span class="keywordflow">else</span>
+00763 {
+00764 <span class="comment">// we need a little FadeIn</span>
+00765 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd10">fillData</a>(lbi, _XFadeSize);
+00766 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd4">fadeIn</a>(lbi);
+00767 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd0">advanceFill</a>(lbi, _XFadeSize);
+00768 cursors.WriteSize -= <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv7">_XFadeSize</a>*2;
+00769 dataToFill -= <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv7">_XFadeSize</a>;
+00770 }
+00771 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd10">fillData</a>(lbi, dataToFill);
+00772 cursors.WriteSize -= dataToFill * 2;
+00773 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd0">advanceFill</a>(lbi, dataToFill);
+00774 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy0">source_playing</a>;
+00775 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr9">_Loop</a>)
+00776 {
+00777 <span class="keywordflow">while</span> (cursors.WriteSize &gt;= 4)
+00778 {
+00779 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr15">_SampleOffset</a> == <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr17">_SampleSize</a>)
+00780 {
+00781 <span class="comment">// rewind the sample</span>
+00782 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr15">_SampleOffset</a> = 0;
+00783 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr1">_ADPCMState</a>.PreviousSample = 0;
+00784 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr1">_ADPCMState</a>.StepIndex = 0;
+00785 }
+00786 <a class="code" href="a04199.html#a6">nlassert</a>(_SampleOffset &lt; _SampleSize);
+00787 dataToFill = <a class="code" href="a04061.html#a0">std::min</a>(<a class="code" href="a05167.html#a17">uint</a>(cursors.WriteSize / 2), _SampleSize - _SampleOffset);
+00788 dataToFill &amp;= 0xfffffffe;
+00789 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd10">fillData</a>(lbi, dataToFill);
+00790 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd0">advanceFill</a>(lbi, dataToFill);
+00791 cursors.WriteSize -= dataToFill*2;
+00792 }
+00793 }
+00794 <span class="keywordflow">else</span>
+00795 {
+00796 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr15">_SampleOffset</a> == <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr17">_SampleSize</a>)
+00797 {
+00798 <span class="comment">// begin to write silence, but stil in play state until all sample are played</span>
+00799 <span class="comment">// _State = source_silencing;</span>
+00800 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd11">fillSilence</a>(lbi, cursors.WriteSize/2);
+00801 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd0">advanceFill</a>(lbi, cursors.WriteSize/2);
+00802 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr19">_SilenceWriten</a> = cursors.WriteSize;
+00803 cursors.WriteSize = 0;
+00804 }
+00805 <span class="comment">// else</span>
+00806 <span class="comment">// _State = source_playing;</span>
+00807 }
+00808
+00809
+00810 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd18">unlock</a>(unlockInfo);
+00811 }
+00812 <span class="keywordflow">else</span>
+00813 {
+00814 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"Couldn't lock the sound buffer for %u bytes"</span>, cursors.WriteSize);
+00815 }
+00816
+00817 <span class="comment">// set the volume NOW</span>
+00818 CListenerDSound* listener = CListenerDSound::instance();
+00819
+00820 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSounda6">updateVolume</a>(listener-&gt;getPos());
+00821
+00822 LeaveCriticalSection(&amp;_CriticalSection);
+00823
+00824 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00825 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundd15" doxytag="NLSOUND::CSourceDSound::release" ></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::CSourceDSound::release </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>
+Release all DirectSound resources.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06429.html#l00171">171</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00413">_3DBuffer</a>, and <a class="el" href="a06430.html#l00407">_SecondaryBuffer</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00152">~CSourceDSound()</a>.
+<p>
+<div class="fragment"><pre>00172 {
+00173 <span class="comment">// _Buffer = 0;</span>
+00174
+00175 <span class="preprocessor">#if EAX_AVAILABLE == 1</span>
+00176 <span class="preprocessor"></span> <span class="keywordflow">if</span> (_EAXSource != 0)
+00177 {
+00178 _EAXSource-&gt;Release();
+00179 _EAXSource = 0;
+00180 }
+00181 <span class="preprocessor">#endif</span>
+00182 <span class="preprocessor"></span>
+00183 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a> != 0)
+00184 {
+00185 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a>-&gt;Stop();
+00186 }
+00187
+00188 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a> != 0)
+00189 {
+00190 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a>-&gt;Release();
+00191 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a> = 0;
+00192 }
+00193
+00194 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a> != 0)
+00195 {
+00196 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a>-&gt;Release();
+00197 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a> = 0;
+00198 }
+00199
+00200 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSounda3" doxytag="NLSOUND::CSourceDSound::reset" ></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::CSourceDSound::reset </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>
+
+<p>
+Definition at line <a class="el" href="a06429.html#l00332">332</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06429.html#l01423">setGain()</a>, <a class="el" href="a06429.html#l00866">setLooping()</a>, and <a class="el" href="a06429.html#l01454">setPitch()</a>.
+<p>
+<div class="fragment"><pre>00333 {
+00334 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundz1314_13">setPitch</a>(1.0f);
+00335 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundz1312_7">setLooping</a>(<span class="keyword">false</span>);
+00336 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundz1314_11">setGain</a>(1.0f);
+00337 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSounda4" doxytag="NLSOUND::CSourceDSound::setAlpha" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> virtual void NLSOUND::CSourceDSound::setAlpha </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">double&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>a</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Set the alpha value for the volume-distance curve<p>
+alpha = 0.0: the volume will decrease linearly between 0dB and -100 dB alpha = 1.0: the volume will decrease linearly between 1.0 and 0.0 (linear scale) alpha = -1.0: the volume will decrease inversely with the distance (1/dist). This is the default used by DirectSound/OpenAL<p>
+For any other value of alpha, an interpolation is be done between the two adjacent curves. For example, if alpha equals 0.5, the volume will be halfway between the linear dB curve and the linear amplitude curve.
+<p>
+Reimplemented from <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1334_8">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06430.html#l00265">265</a> of file <a class="el" href="a06430.html">source_dsound.h</a>.
+<p>
+References <a class="el" href="a06430.html#l00458">_Alpha</a>.
+<p>
+<div class="fragment"><pre>00265 { <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr2">_Alpha</a> = a; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1314_8" doxytag="NLSOUND::CSourceDSound::setCone" ></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::CSourceDSound::setCone </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>innerAngle</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>outerAngle</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>outerGain</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>
+Set the cone angles (in radian) and gain (in [0 , 1]) (default: 2PI, 2PI, 0) (3D mode only).
+<p>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1334_9">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l01671">1671</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00413">_3DBuffer</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, and <a class="el" href="a05587.html#l00079">NLMISC::Pi</a>.
+<p>
+<div class="fragment"><pre>01672 {
+01673 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a> != 0)
+01674 {
+01675 <span class="comment">// Set the cone angles</span>
+01676
+01677 <span class="comment">// Convert from radians to degrees</span>
+01678 DWORD inner = (DWORD)(180.0 * innerAngle / <a class="code" href="a05378.html#a44">Pi</a>);
+01679 DWORD outer = (DWORD)(180.0 * outerAngle / <a class="code" href="a05378.html#a44">Pi</a>);
+01680
+01681
+01682 <span class="comment">// Sanity check: wrap the angles in the [0,360] interval</span>
+01683 <span class="keywordflow">if</span> (outer &lt; inner)
+01684 {
+01685 outer = inner;
+01686 }
+01687
+01688 <span class="keywordflow">while</span> (inner &lt; DS3D_MINCONEANGLE)
+01689 {
+01690 inner += 360;
+01691 }
+01692
+01693 <span class="keywordflow">while</span> (inner &gt; DS3D_MAXCONEANGLE)
+01694 {
+01695 inner -= 360;
+01696 }
+01697
+01698 <span class="keywordflow">while</span> (outer &lt; DS3D_MINCONEANGLE)
+01699 {
+01700 outer += 360;
+01701 }
+01702
+01703 <span class="keywordflow">while</span> (outer &gt; DS3D_MAXCONEANGLE)
+01704 {
+01705 outer -= 360;
+01706 }
+01707
+01708 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a>-&gt;SetConeAngles(inner, outer, DS3D_DEFERRED) != DS_OK)
+01709 {
+01710 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"SetConeAngles failed"</span>);
+01711 }
+01712
+01713 <span class="comment">// Set the outside volume</span>
+01714 <span class="keywordflow">if</span> (outerGain &lt; 0.00001f)
+01715 {
+01716 outerGain = 0.00001f;
+01717 }
+01718
+01719 <span class="comment">// convert from linear amplitude to hundredths of decibels </span>
+01720 LONG volume = (LONG)(100.0 * 20.0 * log10(outerGain));
+01721
+01722 <span class="keywordflow">if</span> (volume &lt; DSBVOLUME_MIN)
+01723 {
+01724 volume = DSBVOLUME_MIN;
+01725 }
+01726 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (volume &gt; DSBVOLUME_MAX)
+01727 {
+01728 volume = DSBVOLUME_MAX;
+01729 }
+01730
+01731 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a>-&gt;SetConeOutsideVolume(volume, DS3D_DEFERRED) != DS_OK)
+01732 {
+01733 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"SetConeOutsideVolume failed"</span>);
+01734 }
+01735
+01736 }
+01737 <span class="keywordflow">else</span>
+01738 {
+01739 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"Requested setCone on a non-3D source"</span>);
+01740 }
+01741 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1314_9" doxytag="NLSOUND::CSourceDSound::setDirection" ></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::CSourceDSound::setDirection </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>dir</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>
+Set the direction vector (3D mode only) (default: (0,0,0) as non-directional).
+<p>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1334_10">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l01380">1380</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00413">_3DBuffer</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>.
+<p>
+<div class="fragment"><pre>01381 {
+01382 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a> != 0)
+01383 {
+01384 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a>-&gt;SetConeOrientation(dir.<a class="code" href="a03128.html#NLMISC_1_1CVectoro0">x</a>, dir.<a class="code" href="a03128.html#NLMISC_1_1CVectoro2">z</a>, dir.<a class="code" href="a03128.html#NLMISC_1_1CVectoro1">y</a>, DS3D_DEFERRED) != DS_OK)
+01385 {
+01386 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"SetConeOrientation failed (x=%.2f, y=%.2f, z=%.2f)"</span>, dir.<a class="code" href="a03128.html#NLMISC_1_1CVectoro0">x</a>, dir.<a class="code" href="a03128.html#NLMISC_1_1CVectoro1">y</a>, dir.<a class="code" href="a03128.html#NLMISC_1_1CVectoro2">z</a>);
+01387 }
+01388 <span class="keywordflow">else</span>
+01389 {
+01390 <span class="comment">//nlwarning ("NLSOUND: %p set source direction NEL(p:%.2f/%.2f/%.2f) DS(p:%.2f/%.2f/%.2f)", this, dir.x, dir.y, dir.z, dir.x, dir.z, dir.y);</span>
+01391 }
+01392 }
+01393 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1314_10" doxytag="NLSOUND::CSourceDSound::setEAXProperty" ></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::CSourceDSound::setEAXProperty </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>prop</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>void *&nbsp;</td>
+ <td class="mdname" nowrap> <em>value</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>valuesize</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>
+Set any EAX source property if EAX available.
+<p>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1334_11">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l01781">1781</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a05788.html#l00056">H_AUTO</a>, <a class="el" href="a05646.html#l01119">res</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05646.html#l01132">value</a>.
+<p>
+<div class="fragment"><pre>01782 {
+01783 <span class="preprocessor">#if EAX_AVAILABLE == 1</span>
+01784 <span class="preprocessor"></span> <span class="keywordflow">if</span> (_EAXSource == 0)
+01785 {
+01786 _EAXSource = CSoundDriverDSound::instance()-&gt;createPropertySet(<span class="keyword">this</span>);
+01787 }
+01788 <span class="keywordflow">if</span> ( _EAXSource != NULL )
+01789 {
+01790 <a class="code" href="a04365.html#a4">H_AUTO</a>(NLSOUND_EAXPropertySet_Set)
+01791 HRESULT <a class="code" href="a04223.html#a643">res</a> = _EAXSource-&gt;Set( DSPROPSETID_EAX_BufferProperties, prop, NULL, 0, value, valuesize );
+01792 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a643">res</a> != S_OK)
+01793 {
+01794 <span class="comment">// nlwarning("Setting EAX Param #%u fail : %x", prop, res);</span>
+01795 }
+01796 }
+01797 <span class="preprocessor">#endif</span>
+01798 <span class="preprocessor"></span>}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1314_11" doxytag="NLSOUND::CSourceDSound::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::CSourceDSound::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><code> [virtual]</code></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>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1334_12">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l01423">1423</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00332">reset()</a>.
+<p>
+<div class="fragment"><pre>01424 {
+01425 <a class="code" href="a05378.html#a374">clamp</a>(gain, 0.00001f, 1.0f);
+01426 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr7">_Gain</a> = gain;
+01427
+01428 <span class="comment">/* convert from linear amplitude to hundredths of decibels */</span>
+01429 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr22">_Volume</a> = (<a class="code" href="a04558.html#a11">uint32</a>)(100.0 * 20.0 * log10(gain));
+01430 <a class="code" href="a05378.html#a374">clamp</a>(_Volume, DSBVOLUME_MIN, DSBVOLUME_MAX);
+01431
+01432 <span class="comment">//nlwarning ("set gain %f vol %d", gain, _Volume);</span>
+01433
+01434 <span class="comment">/*</span>
+01435 <span class="comment"> if ((_SecondaryBuffer != 0) &amp;&amp; (_SecondaryBuffer-&gt;SetVolume(_Volume) != DS_OK))</span>
+01436 <span class="comment"> {</span>
+01437 <span class="comment"> nlwarning("SetVolume failed");</span>
+01438 <span class="comment"> }</span>
+01439 <span class="comment"> */</span>
+01440 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1312_7" doxytag="NLSOUND::CSourceDSound::setLooping" ></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::CSourceDSound::setLooping </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">bool&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>l</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>
+Set looping on/off for future playbacks (default: off).
+<p>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1332_6">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l00866">866</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00401">_Loop</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00332">reset()</a>.
+<p>
+<div class="fragment"><pre>00867 {
+00868 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr9">_Loop</a> = <a class="code" href="a05373.html#a2">l</a>;
+00869 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1314_12" doxytag="NLSOUND::CSourceDSound::setMinMaxDistances" ></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::CSourceDSound::setMinMaxDistances </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>mindist</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>maxdist</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>deferred</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>
+Set the min and max distances (default: 1, MAX_FLOAT) (3D mode only).
+<p>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1334_13">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l01558">1558</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00413">_3DBuffer</a>, and <a class="el" href="a05622.html#l00135">nlwarning</a>.
+<p>
+<div class="fragment"><pre>01559 {
+01560 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a> != 0)
+01561 {
+01562 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a>-&gt;SetMinDistance(std::max(DS3D_DEFAULTMINDISTANCE, mindist), deferred ? DS3D_DEFERRED : DS3D_IMMEDIATE) != DS_OK)
+01563 {
+01564 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"SetMinDistance (%f) failed"</span>, mindist);
+01565 }
+01566 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a>-&gt;SetMaxDistance(std::min(DS3D_DEFAULTMAXDISTANCE, maxdist), deferred ? DS3D_DEFERRED : DS3D_IMMEDIATE) != DS_OK)
+01567 {
+01568 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"SetMaxDistance (%f) failed"</span>, maxdist);
+01569 }
+01570 }
+01571 <span class="keywordflow">else</span>
+01572 {
+01573 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"Requested setMinMaxDistances on a non-3D source"</span>);
+01574 }
+01575 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1314_13" doxytag="NLSOUND::CSourceDSound::setPitch" ></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::CSourceDSound::setPitch </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>pitch</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>
+Shift the frequency. 1.0f equals identity, each reduction of 50% equals a pitch shift of one octave. 0 is not a legal value.
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1334_14">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l01454">1454</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00374">_Sample</a>, <a class="el" href="a06430.html#l00388">_SampleRate</a>, <a class="el" href="a06430.html#l00407">_SecondaryBuffer</a>, <a class="el" href="a05646.html#l01016">format</a>, <a class="el" href="a02298.html#NLSOUND_1_1IBuffera3">NLSOUND::IBuffer::getFormat()</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a06417.html#l00098">NLSOUND::TSampleFormat</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00332">reset()</a>.
+<p>
+<div class="fragment"><pre>01455 {
+01456 <span class="comment">// _Freq = coeff;</span>
+01457
+01458 <span class="keywordflow">if</span> ((<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">_Sample</a> != 0) &amp;&amp; (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a> != 0))
+01459 {
+01460 <a class="code" href="a05381.html#a80">TSampleFormat</a> <a class="code" href="a04223.html#a641">format</a>;
+01461 <a class="code" href="a04558.html#a15">uint</a> freq;
+01462
+01463 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">_Sample</a>-&gt;getFormat(format, freq);
+01464
+01465 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr16">_SampleRate</a> = (<a class="code" href="a04558.html#a11">uint32</a>) (coeff * (<span class="keywordtype">float</span>) freq);
+01466
+01467 <span class="comment">//nlwarning("Freq=%d", newfreq);</span>
+01468
+01469 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a>-&gt;SetFrequency(_SampleRate) != DS_OK)
+01470 {
+01471 <span class="comment">// nlwarning("SetFrequency failed (buffer freq=%d, NeL freq=%.5f, DSound freq=%d)", freq, coeff, newfreq);</span>
+01472 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"SetFrequency"</span>);
+01473 }
+01474 }
+01475 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1314_14" doxytag="NLSOUND::CSourceDSound::setPos" ></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::CSourceDSound::setPos </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>pos</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>deferred</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>
+Set the position vector (default: (0,0,0)). 3D mode -&gt; 3D position st mode -&gt; x is the pan value (from left (-1) to right (1)), set y and z to 0 <dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>deferred</em>&nbsp;</td><td>false to apply position immediatly</td></tr>
+ </table>
+</dl>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1334_15">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l01313">1313</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00413">_3DBuffer</a>, and <a class="el" href="a05622.html#l00135">nlwarning</a>.
+<p>
+<div class="fragment"><pre>01314 {
+01315 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr12">_Pos</a> = pos;
+01316 <span class="comment">// Coordinate system: conversion from NeL to OpenAL/GL:</span>
+01317 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a> != NULL)
+01318 {
+01319 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a>-&gt;SetPosition(pos.x, pos.z, pos.y, deferred ? DS3D_DEFERRED : DS3D_IMMEDIATE) != DS_OK)
+01320 {
+01321 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"SetPosition failed"</span>);
+01322 }
+01323 <span class="keywordflow">else</span>
+01324 {
+01325 <span class="comment">//nlwarning ("%p set source NEL(p:%.2f/%.2f/%.2f) DS(p:%.2f/%.2f/%.2f)", this, pos.x, pos.y, pos.z, pos.x, pos.z, pos.y);</span>
+01326 }
+01327 }
+01328 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1314_15" doxytag="NLSOUND::CSourceDSound::setSourceRelativeMode" ></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::CSourceDSound::setSourceRelativeMode </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">bool&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>mode</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>
+Set the source relative mode. If true, positions are interpreted relative to the listener position (default: false).
+<p>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1334_16">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l01505">1505</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00413">_3DBuffer</a>, and <a class="el" href="a05622.html#l00135">nlwarning</a>.
+<p>
+<div class="fragment"><pre>01506 {
+01507 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a> != 0)
+01508 {
+01509 HRESULT hr;
+01510
+01511 <span class="keywordflow">if</span> (mode)
+01512 {
+01513 hr = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a>-&gt;SetMode(DS3DMODE_HEADRELATIVE, DS3D_IMMEDIATE);
+01514 }
+01515 <span class="keywordflow">else</span>
+01516 {
+01517 hr = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a>-&gt;SetMode(DS3DMODE_NORMAL, DS3D_IMMEDIATE);
+01518 }
+01519
+01520 <span class="keywordflow">if</span> (hr != DS_OK)
+01521 {
+01522 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"SetMode failed"</span>);
+01523 }
+01524 }
+01525 <span class="keywordflow">else</span>
+01526 {
+01527 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"Requested setSourceRelativeMode on a non-3D source"</span>);
+01528 }
+01529 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1310_1" doxytag="NLSOUND::CSourceDSound::setStaticBuffer" ></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::CSourceDSound::setStaticBuffer </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> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Set the buffer that will be played (no streaming) If the buffer is stereo, the source mode becomes stereo and the source relative mode is on, otherwise the source is considered as a 3D source. Set NULL to set "no buffer"
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1330_1">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l00342">342</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00418">_ADPCMState</a>, <a class="el" href="a06430.html#l00415">_CriticalSection</a>, <a class="el" href="a06430.html#l00391">_NextSample</a>, <a class="el" href="a06430.html#l00380">_PlayOffset</a>, <a class="el" href="a06430.html#l00374">_Sample</a>, <a class="el" href="a06430.html#l00382">_SampleFreq</a>, <a class="el" href="a06430.html#l00378">_SampleOffset</a>, <a class="el" href="a06430.html#l00376">_SampleSize</a>, <a class="el" href="a06430.html#l00368">_State</a>, <a class="el" href="a05646.html#l00649">buffer</a>, <a class="el" href="a05381.html#a80a19">NLSOUND::Mono16</a>, <a class="el" href="a05381.html#a80a18">NLSOUND::Mono16ADPCM</a>, <a class="el" href="a05381.html#a80a17">NLSOUND::Mono8</a>, <a class="el" href="a05517.html#l00092">NLSOUND::IBuffer::TADPCMState::PreviousSample</a>, <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy0">source_playing</a>, <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy3">source_swap_pending</a>, <a class="el" href="a05517.html#l00094">NLSOUND::IBuffer::TADPCMState::StepIndex</a>, <a class="el" href="a05381.html#a80a21">NLSOUND::Stereo16</a>, and <a class="el" href="a05381.html#a80a20">NLSOUND::Stereo8</a>.
+<p>
+<div class="fragment"><pre>00343 {
+00344 EnterCriticalSection(&amp;_CriticalSection);
+00345
+00346 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> == <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy0">source_playing</a>)
+00347 {
+00348 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy3">source_swap_pending</a>;
+00349 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">_Sample</a> = 0;
+00350 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr10">_NextSample</a> = <a class="code" href="a04223.html#a589">buffer</a>;
+00351 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr15">_SampleOffset</a> = 0;
+00352 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr11">_PlayOffset</a> = 0;
+00353 }
+00354 <span class="keywordflow">else</span>
+00355 {
+00356 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">_Sample</a> = <a class="code" href="a04223.html#a589">buffer</a>;
+00357 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr10">_NextSample</a> = 0;
+00358 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr15">_SampleOffset</a> = 0;
+00359 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr11">_PlayOffset</a> = 0;
+00360 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr1">_ADPCMState</a>.PreviousSample = 0;
+00361 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr1">_ADPCMState</a>.StepIndex = 0;
+00362 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a589">buffer</a>)
+00363 {
+00364 <span class="comment">// _SampleSize = buffer-&gt;getSize();</span>
+00365 <a class="code" href="a04223.html#a589">buffer</a>-&gt;getFormat(_Format, _SampleFreq);
+00366 <span class="keywordflow">switch</span>(<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr5">_Format</a>)
+00367 {
+00368 <span class="keywordflow">case</span> <a class="code" href="a05381.html#a80a17">Mono8</a>:
+00369 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr17">_SampleSize</a> = <a class="code" href="a04223.html#a589">buffer</a>-&gt;getSize();
+00370 <span class="keywordflow">break</span>;
+00371 <span class="keywordflow">case</span> <a class="code" href="a05381.html#a80a19">Mono16</a>:
+00372 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr17">_SampleSize</a> = <a class="code" href="a04223.html#a589">buffer</a>-&gt;getSize() / 2;
+00373 <span class="keywordflow">break</span>;
+00374 <span class="keywordflow">case</span> <a class="code" href="a05381.html#a80a18">Mono16ADPCM</a>:
+00375 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr17">_SampleSize</a> = <a class="code" href="a04223.html#a589">buffer</a>-&gt;getSize() * 2;
+00376 <span class="keywordflow">break</span>;
+00377 <span class="keywordflow">case</span> <a class="code" href="a05381.html#a80a20">Stereo8</a>:
+00378 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr17">_SampleSize</a> = <a class="code" href="a04223.html#a589">buffer</a>-&gt;getSize() / 2;
+00379 <span class="keywordflow">break</span>;
+00380 <span class="keywordflow">case</span> <a class="code" href="a05381.html#a80a21">Stereo16</a>:
+00381 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr17">_SampleSize</a> = <a class="code" href="a04223.html#a589">buffer</a>-&gt;getSize() / 4;
+00382 <span class="keywordflow">break</span>;
+00383 }
+00384 }
+00385 }
+00386
+00387 <span class="comment">/*</span>
+00388 <span class="comment"> // If the user calls setStaticBuffer with a null buffer,</span>
+00389 <span class="comment"> // stop the currently playing buffer and set it to null.</span>
+00390 <span class="comment"> // Otherwise, store the buffer in the swap buffer variable.</span>
+00391 <span class="comment"> // A crossfade between the current buffer and the swap buffer</span>
+00392 <span class="comment"> // will be done when the user calls play.</span>
+00393 <span class="comment"> if (buffer == 0)</span>
+00394 <span class="comment"> {</span>
+00395 <span class="comment"> stop();</span>
+00396 <span class="comment"> _Buffer = 0;</span>
+00397 <span class="comment"> _BufferSize = 0;</span>
+00398 <span class="comment"> _BytesWritten = 0;</span>
+00399 <span class="comment"> }</span>
+00400 <span class="comment"></span>
+00401 <span class="comment"> _SwapBuffer = _Buffer = buffer;</span>
+00402 <span class="comment"></span>
+00403 <span class="comment"> _ADPCMState.PreviousSample = 0;</span>
+00404 <span class="comment"> _ADPCMState.StepIndex = 0;</span>
+00405 <span class="comment">*/</span>
+00406 LeaveCriticalSection(&amp;_CriticalSection);
+00407 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1ISourcez1330_2" doxytag="NLSOUND::CSourceDSound::setStreamLoader" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> virtual void NLSOUND::ISource::setStreamLoader </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03862.html">ILoader</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>loader</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, virtual, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Set the sound loader that will be used to stream in the data to play If the buffer is stereo, the source mode becomes stereo and the source relative mode is on, otherwise the source is considered as a 3D source.
+<p>
+Definition at line <a class="el" href="a06424.html#l00076">76</a> of file <a class="el" href="a06424.html">source.h</a>.
+<p>
+References <a class="el" href="a06424.html#l00170">NLSOUND::ISource::_Loader</a>.
+<p>
+<div class="fragment"><pre>00076 { <a class="code" href="a03428.html#NLSOUND_1_1ISourcep0">_Loader</a> = loader; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1314_16" doxytag="NLSOUND::CSourceDSound::setVelocity" ></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::CSourceDSound::setVelocity </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>vel</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>deferred</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>
+Set the velocity vector (3D mode only) (default: (0,0,0)).
+<p>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1334_17">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l01341">1341</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00413">_3DBuffer</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>.
+<p>
+<div class="fragment"><pre>01342 {
+01343 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a> != NULL)
+01344 {
+01345 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">_3DBuffer</a>-&gt;SetVelocity(vel.<a class="code" href="a03128.html#NLMISC_1_1CVectoro0">x</a>, vel.<a class="code" href="a03128.html#NLMISC_1_1CVectoro2">z</a>, vel.<a class="code" href="a03128.html#NLMISC_1_1CVectoro1">y</a>, deferred ? DS3D_DEFERRED : DS3D_IMMEDIATE) != DS_OK)
+01346 {
+01347 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"SetVelocity failed"</span>);
+01348 }
+01349 }
+01350 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundd16" doxytag="NLSOUND::CSourceDSound::silence" ></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::CSourceDSound::silence </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_1CSourceDSounda5" doxytag="NLSOUND::CSourceDSound::sourceName" ></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::CSourceDSound::sourceName </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 OpenAL source name.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06430.html#l00242">242</a> of file <a class="el" href="a06430.html">source_dsound.h</a>.
+<p>
+References <a class="el" href="a06430.html#l00365">_SourceName</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00242 { <span class="keywordflow">return</span> <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr20">_SourceName</a>; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1312_8" doxytag="NLSOUND::CSourceDSound::stop" ></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::CSourceDSound::stop </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>
+Stop playing.
+<p>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1332_7">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l00827">827</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00415">_CriticalSection</a>, <a class="el" href="a06430.html#l00394">_FillOffset</a>, <a class="el" href="a06430.html#l00395">_SilenceWriten</a>, <a class="el" href="a06430.html#l00368">_State</a>, <a class="el" href="a06429.html#l00074">_XFadeSize</a>, <a class="el" href="a06429.html#l00662">advanceFill()</a>, <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundd6">fadeOut()</a>, <a class="el" href="a06429.html#l00537">fillSilence()</a>, <a class="el" href="a06429.html#l00419">getCursors()</a>, <a class="el" href="a06429.html#l01811">lock()</a>, <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy1">source_silencing</a>, <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy2">source_stoped</a>, <a class="el" href="a06429.html#l01868">unlock()</a>, <a class="el" href="a06430.html#l00300">NLSOUND::CSourceDSound::TCursors::WriteCursor</a>, and <a class="el" href="a06430.html#l00301">NLSOUND::CSourceDSound::TCursors::WriteSize</a>.
+<p>
+<div class="fragment"><pre>00828 {
+00829 <span class="comment">// nldebug("Stop");</span>
+00830 EnterCriticalSection(&amp;_CriticalSection);
+00831
+00832 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> != <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy2">source_stoped</a> &amp;&amp; <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> != <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy1">source_silencing</a>)
+00833 {
+00834 <span class="comment">// retreive the cursors;</span>
+00835 TCursors cursors;
+00836 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd12">getCursors</a>(cursors);
+00837
+00838 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr4">_FillOffset</a> = cursors.WriteCursor;
+00839 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr4">_FillOffset</a> = (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr4">_FillOffset</a>+3) &amp; 0xfffffffC;
+00840
+00841 TLockedBufferInfo lbi;
+00842 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd13">lock</a>(_FillOffset, cursors.WriteSize, lbi))
+00843 {
+00844 TLockedBufferInfo unlockInfo(lbi);
+00845
+00846 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd6">fadeOut</a>(lbi);
+00847 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd0">advanceFill</a>(lbi, _XFadeSize);
+00848 cursors.WriteSize -= <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv7">_XFadeSize</a>*2;
+00849 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd11">fillSilence</a>(lbi, cursors.WriteSize/2);
+00850 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd0">advanceFill</a>(lbi, cursors.WriteSize/2);
+00851 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr19">_SilenceWriten</a> = cursors.WriteSize;
+00852
+00853 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy1">source_silencing</a>;
+00854
+00855 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd18">unlock</a>(unlockInfo);
+00856 }
+00857 }
+00858
+00859 LeaveCriticalSection(&amp;_CriticalSection);
+00860 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundd17" doxytag="NLSOUND::CSourceDSound::swap" ></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::CSourceDSound::swap </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_1CSourceDSoundd18" doxytag="NLSOUND::CSourceDSound::unlock" ></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::CSourceDSound::unlock </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03432.html">TLockedBufferInfo</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>lockedInfo</em> </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>
+
+<p>
+Definition at line <a class="el" href="a06429.html#l01868">1868</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00407">_SecondaryBuffer</a>, <a class="el" href="a06430.html#l00308">NLSOUND::CSourceDSound::TLockedBufferInfo::Ptr1</a>, <a class="el" href="a06430.html#l00312">NLSOUND::CSourceDSound::TLockedBufferInfo::Ptr2</a>, <a class="el" href="a06430.html#l00309">NLSOUND::CSourceDSound::TLockedBufferInfo::Size1</a>, and <a class="el" href="a06430.html#l00313">NLSOUND::CSourceDSound::TLockedBufferInfo::Size2</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00688">play()</a>, <a class="el" href="a06429.html#l00827">stop()</a>, and <a class="el" href="a06429.html#l01059">update()</a>.
+<p>
+<div class="fragment"><pre>01869 {
+01870 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a>-&gt;Unlock(lbi.Ptr1, lbi.Size1, lbi.Ptr2, lbi.Size2);
+01871 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+01872 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundz1312_9" doxytag="NLSOUND::CSourceDSound::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"> bool NLSOUND::CSourceDSound::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><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Update the source (e.g. continue to stream the data in).
+<p>
+
+<p>
+Implements <a class="el" href="a03428.html#NLSOUND_1_1ISourcez1332_8">NLSOUND::ISource</a>.
+<p>
+Definition at line <a class="el" href="a06429.html#l01059">1059</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00418">_ADPCMState</a>, <a class="el" href="a06430.html#l00415">_CriticalSection</a>, <a class="el" href="a06430.html#l00394">_FillOffset</a>, <a class="el" href="a06430.html#l00393">_LastPlayPos</a>, <a class="el" href="a06430.html#l00401">_Loop</a>, <a class="el" href="a06430.html#l00380">_PlayOffset</a>, <a class="el" href="a06430.html#l00378">_SampleOffset</a>, <a class="el" href="a06430.html#l00376">_SampleSize</a>, <a class="el" href="a06429.html#l00070">_SecondaryBufferSize</a>, <a class="el" href="a06430.html#l00395">_SilenceWriten</a>, <a class="el" href="a06429.html#l00071">_SizeMask</a>, <a class="el" href="a06430.html#l00368">_State</a>, <a class="el" href="a06429.html#l00073">_UpdateCopySize</a>, <a class="el" href="a06429.html#l00074">_XFadeSize</a>, <a class="el" href="a06429.html#l00662">advanceFill()</a>, <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundd6">fadeOut()</a>, <a class="el" href="a06429.html#l00517">fillData()</a>, <a class="el" href="a06429.html#l00537">fillSilence()</a>, <a class="el" href="a06429.html#l00419">getCursors()</a>, <a class="el" href="a05788.html#l00056">H_AUTO</a>, <a class="el" href="a06429.html#l01811">lock()</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a06430.html#l00299">NLSOUND::CSourceDSound::TCursors::PlayCursor</a>, <a class="el" href="a05517.html#l00092">NLSOUND::IBuffer::TADPCMState::PreviousSample</a>, <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy0">source_playing</a>, <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy1">source_silencing</a>, <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy2">source_stoped</a>, <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy3">source_swap_pending</a>, <a class="el" href="a05517.html#l00094">NLSOUND::IBuffer::TADPCMState::StepIndex</a>, <a class="el" href="a06590.html#l00224">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, <a class="el" href="a06429.html#l01868">unlock()</a>, <a class="el" href="a06430.html#l00300">NLSOUND::CSourceDSound::TCursors::WriteCursor</a>, and <a class="el" href="a06430.html#l00301">NLSOUND::CSourceDSound::TCursors::WriteSize</a>.
+<p>
+<div class="fragment"><pre>01060 {
+01061 <a class="code" href="a04365.html#a4">H_AUTO</a>(NLSOUND_SourceDSoundUpdate)
+01062 <span class="keywordtype">bool</span> updateDone = <span class="keyword">false</span>;
+01063
+01064 EnterCriticalSection(&amp;_CriticalSection);
+01065
+01066 <span class="comment">// fill some data into the buffer</span>
+01067 TCursors cursors;
+01068 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd12">getCursors</a>(cursors);
+01069 <a class="code" href="a04558.html#a11">uint32</a> writeSize;
+01070
+01071 <span class="comment">// The total size available for fill (between fillOffset and play cusors)</span>
+01072 <a class="code" href="a04558.html#a11">uint32</a> fillSize = (cursors.PlayCursor - <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr4">_FillOffset</a>) &amp; <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv4">_SizeMask</a>;
+01073 <span class="comment">// The play margin (between play and write cursor)</span>
+01074 <a class="code" href="a04558.html#a11">uint32</a> margin = (cursors.WriteCursor - cursors.PlayCursor) &amp; <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv4">_SizeMask</a>;
+01075 <span class="comment">// The number of sample played since previous update</span>
+01076 <a class="code" href="a04558.html#a11">uint32</a> samplePlayed = ((cursors.PlayCursor - <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr8">_LastPlayPos</a>) &amp; <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv4">_SizeMask</a>) / 2;
+01077 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr8">_LastPlayPos</a> = cursors.PlayCursor;
+01078
+01079
+01080 <span class="comment">// if (_FillOffset &lt; cursors.WriteCursor &amp;&amp; _FillOffset &gt;cursors.PlayCursor)</span>
+01081 <span class="keywordflow">if</span> (fillSize + margin &gt; <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv3">_SecondaryBufferSize</a>)
+01082 {
+01083 <span class="comment">// arg ! </span>
+01084 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"FillOffset is between play and write cursor (P = %p F = %p W = %p!"</span>, cursors.PlayCursor, _FillOffset, cursors.WriteCursor);
+01085 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr4">_FillOffset</a> = cursors.WriteCursor;
+01086 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr4">_FillOffset</a> = (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr4">_FillOffset</a>+3) &amp; 0xfffffffC;
+01087 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr19">_SilenceWriten</a> = 0;
+01088 <a class="code" href="a04199.html#a6">nlassert</a>(_FillOffset &lt; _SecondaryBufferSize);
+01089 }
+01090
+01091 <span class="comment">// advance of the fill offset over the write cursor</span>
+01092 <a class="code" href="a04558.html#a11">uint32</a> advance = (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr4">_FillOffset</a> - cursors.WriteCursor) &amp; <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv4">_SizeMask</a>;
+01093
+01094 <span class="comment">/* nldebug("Play = %p, Write = %p, Fill = %p, FillSize = %p, Margin = %p, Advance = %p",</span>
+01095 <span class="comment"> cursors.PlayCursor, cursors.WriteCursor, _FillOffset, fillSize, margin, advance);</span>
+01096 <span class="comment">*/</span>
+01097 <span class="keywordflow">if</span> (advance &gt; <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv6">_UpdateCopySize</a>)
+01098 {
+01099 <span class="comment">// enougth data wrote, wait until next update</span>
+01100 cursors.WriteSize = 0;
+01101 }
+01102 <span class="comment">/* if (cursors.WriteSize)</span>
+01103 <span class="comment"> {</span>
+01104 <span class="comment"> if (_FillOffset &lt; cursors.WriteCursor)</span>
+01105 <span class="comment"> {</span>
+01106 <span class="comment"> if (_FillOffset &gt; cursors.WriteCursor + _UpdateCopySize - _SecondaryBufferSize )</span>
+01107 <span class="comment"> {</span>
+01108 <span class="comment">// nlwarning("Enougth data wrote");</span>
+01109 <span class="comment"> // already fill enough data</span>
+01110 <span class="comment"> cursors.WriteSize = 0;</span>
+01111 <span class="comment"> }</span>
+01112 <span class="comment"> }</span>
+01113 <span class="comment"> else</span>
+01114 <span class="comment"> {</span>
+01115 <span class="comment"> if (_FillOffset &gt; cursors.WriteCursor + _UpdateCopySize)</span>
+01116 <span class="comment"> {</span>
+01117 <span class="comment">// nlwarning("Enougth data wrote");</span>
+01118 <span class="comment"> // already fill enough data</span>
+01119 <span class="comment"> cursors.WriteSize = 0;</span>
+01120 <span class="comment"> }</span>
+01121 <span class="comment"> }</span>
+01122 <span class="comment"> }</span>
+01123 <span class="comment">*/</span>
+01124 <span class="comment">// nldebug("Cursors : Play = %p, Write = %p, Fill = %p", cursors.PlayCursor, cursors.WriteCursor, _FillOffset);</span>
+01125
+01126 cursors.WriteCursor = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr4">_FillOffset</a>;
+01127 writeSize = cursors.WriteSize; <span class="comment">// compute the real played sample offset</span>
+01128
+01129 <span class="comment">// update the real number of played sample</span>
+01130 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> == <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy0">source_playing</a>)
+01131 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr11">_PlayOffset</a> += samplePlayed;
+01132
+01133 <span class="keywordflow">if</span> (writeSize &gt;= <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv6">_UpdateCopySize</a>)
+01134 {
+01135 <span class="comment">// nldebug("Update %p bytes", _UpdateCopySize);</span>
+01136 writeSize = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv6">_UpdateCopySize</a>;
+01137 updateDone = <span class="keyword">true</span>;
+01138 TLockedBufferInfo lbi;
+01139 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd13">lock</a>(_FillOffset, writeSize, lbi))
+01140 {
+01141 TLockedBufferInfo unlockInfo(lbi);
+01142 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> == <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy0">source_playing</a>)
+01143 {
+01144 <a class="code" href="a04199.html#a6">nlassert</a>(_SampleOffset &lt;= _SampleSize);
+01145 <a class="code" href="a04558.html#a11">uint32</a> updateSize = <a class="code" href="a04061.html#a0">min</a>(_SampleSize - _SampleOffset, <a class="code" href="a05167.html#a17">uint</a>(writeSize/2));
+01146 updateSize &amp;= 0xfffffffe;
+01147 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd10">fillData</a>(lbi, updateSize);
+01148 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd0">advanceFill</a>(lbi, updateSize);
+01149 writeSize -= updateSize*2;
+01150
+01151 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr9">_Loop</a>)
+01152 {
+01153 <span class="keywordflow">while</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr11">_PlayOffset</a> &gt;= <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr17">_SampleSize</a>)
+01154 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr11">_PlayOffset</a> -= <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr17">_SampleSize</a>;
+01155
+01156 <span class="comment">// repeat until we have at least 2 sample to write</span>
+01157 <span class="keywordflow">while</span> (writeSize &gt;= 4)
+01158 {
+01159 <span class="keywordflow">if</span> (_SampleOffset == <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr17">_SampleSize</a>)
+01160 {
+01161 <span class="comment">// rewind the sample</span>
+01162 _SampleOffset = 0;
+01163 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr1">_ADPCMState</a>.PreviousSample = 0;
+01164 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr1">_ADPCMState</a>.StepIndex = 0;
+01165 }
+01166
+01167 updateSize = <a class="code" href="a04061.html#a0">min</a>(_SampleSize - _SampleOffset, <a class="code" href="a05167.html#a17">uint</a>(writeSize/2));
+01168 updateSize &amp;= 0xfffffffe;
+01169 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd10">fillData</a>(lbi, updateSize);
+01170 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd0">advanceFill</a>(lbi, updateSize);
+01171 writeSize -= updateSize*2;
+01172 }
+01173 }
+01174 <span class="keywordflow">else</span>
+01175 {
+01176 <span class="keywordflow">if</span> (_SampleOffset == <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr17">_SampleSize</a>)
+01177 {
+01178 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd11">fillSilence</a>(lbi, writeSize/2);
+01179 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd0">advanceFill</a>(lbi, writeSize/2);
+01180 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr19">_SilenceWriten</a> += writeSize;
+01181 }
+01182 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr11">_PlayOffset</a> &gt;= <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr17">_SampleSize</a>)
+01183 {
+01184 <span class="comment">// all the sample is played, no we are in silencing state !</span>
+01185 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr11">_PlayOffset</a> = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr17">_SampleSize</a>;
+01186 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy1">source_silencing</a>;
+01187 }
+01188 }
+01189
+01190 }
+01191 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> == <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy3">source_swap_pending</a>)
+01192 {
+01193 <span class="comment">// the sample has been changed but not replayed yet ? so we 'stop' the old buffer</span>
+01194
+01195 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd6">fadeOut</a>(lbi);
+01196 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd0">advanceFill</a>(lbi, _XFadeSize);
+01197 writeSize -= <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv7">_XFadeSize</a>*2;
+01198 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd11">fillSilence</a>(lbi, writeSize/2);
+01199 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd0">advanceFill</a>(lbi, writeSize/2);
+01200 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr19">_SilenceWriten</a> = writeSize;
+01201 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy1">source_silencing</a>;
+01202 }
+01203 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> == <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy1">source_silencing</a>)
+01204 {
+01205 <span class="comment">// write silence into the buffer.</span>
+01206 <a class="code" href="a04558.html#a11">uint32</a> updateSize = <a class="code" href="a04061.html#a0">min</a>(writeSize, _SecondaryBufferSize - _SilenceWriten);
+01207 updateSize &amp;= 0xfffffffC;
+01208 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd11">fillSilence</a>(lbi, updateSize/2);
+01209 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd0">advanceFill</a>(lbi, updateSize/2);
+01210 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr19">_SilenceWriten</a> += updateSize;
+01211
+01212 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr19">_SilenceWriten</a> == <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv3">_SecondaryBufferSize</a>)
+01213 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">_State</a> = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundy4NLSOUND_1_1CSourceDSoundy2">source_stoped</a>;
+01214 }
+01215 <span class="keywordflow">else</span>
+01216 {
+01217 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"Update not needed !"</span>);
+01218 }
+01219
+01220 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundd18">unlock</a>(unlockInfo);
+01221 }
+01222 }
+01223
+01224 LeaveCriticalSection(&amp;_CriticalSection);
+01225
+01226 <span class="keywordflow">return</span> updateDone;
+01227 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSounda6" doxytag="NLSOUND::CSourceDSound::updateVolume" ></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::CSourceDSound::updateVolume </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>listener</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>
+Update the source's volume according to its distance and fade out curve. It takes the current position of the listener as argument.
+<p>
+Definition at line <a class="el" href="a06429.html#l01608">1608</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06430.html#l00458">_Alpha</a>, <a class="el" href="a06430.html#l00407">_SecondaryBuffer</a>, <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06429.html#l01580">getMinMaxDistances()</a>, <a class="el" href="a06429.html#l01333">getPos()</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a05981.html#l00099">sint32</a>, and <a class="el" href="a06682.html#l00111">NLMISC::CVector::sqrnorm()</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00688">play()</a>.
+<p>
+<div class="fragment"><pre>01609 {
+01610 <span class="preprocessor">#if MANUAL_ROLLOFF == 1</span>
+01611 <span class="preprocessor"></span> <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a>-&gt;SetVolume(_Volume);
+01612 <span class="keywordflow">return</span>;
+01613 <span class="preprocessor">#endif</span>
+01614 <span class="preprocessor"></span>
+01615 CVector pos = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundz1314_5">getPos</a>();
+01616 pos -= listener;
+01617
+01618 <span class="keywordtype">float</span> sqrdist = pos.<a class="code" href="a03128.html#NLMISC_1_1CVectorz2049_5">sqrnorm</a>();
+01619 <span class="keywordtype">float</span> <a class="code" href="a04061.html#a0">min</a>, max;
+01620
+01621 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundz1314_3">getMinMaxDistances</a>(min, max);
+01622
+01623 <span class="keywordflow">if</span> (sqrdist &lt; <a class="code" href="a04061.html#a0">min</a> * <a class="code" href="a04061.html#a0">min</a>)
+01624 {
+01625 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a>-&gt;SetVolume(_Volume);
+01626 <span class="comment">//nlwarning("VOLUME = %ddB, rolloff = %0.2f", _Volume/100, CListenerDSound::instance()-&gt;getRolloffFactor());</span>
+01627 }
+01628 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (sqrdist &gt; max * max)
+01629 {
+01630 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a>-&gt;SetVolume(DSBVOLUME_MIN);
+01631 <span class="comment">//nlwarning("VOLUME = %ddB, rolloff = %0.2f", DSBVOLUME_MIN/100, CListenerDSound::instance()-&gt;getRolloffFactor());</span>
+01632 }
+01633 <span class="keywordflow">else</span>
+01634 {
+01635 <a class="code" href="a04558.html#a10">sint32</a> db = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr22">_Volume</a>;
+01636
+01637 <span class="keywordtype">double</span> dist = (<span class="keywordtype">double</span>) sqrt(sqrdist);
+01638
+01639 <span class="comment">// linearly descending volume on a dB scale</span>
+01640 <span class="keywordtype">double</span> db1 = DSBVOLUME_MIN * (dist - <a class="code" href="a04061.html#a0">min</a>) / (max - <a class="code" href="a04061.html#a0">min</a>);
+01641
+01642 <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr2">_Alpha</a> == 0.0) {
+01643 db += (<a class="code" href="a04558.html#a10">sint32</a>) db1;
+01644
+01645 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr2">_Alpha</a> &gt; 0.0) {
+01646 <span class="keywordtype">double</span> amp2 = 0.0001 + 0.9999 * (max - dist) / (max - <a class="code" href="a04061.html#a0">min</a>); <span class="comment">// linear amp between 0.00001 and 1.0</span>
+01647 <span class="keywordtype">double</span> db2 = 2000.0 * log10(amp2); <span class="comment">// covert to 1/100th decibels</span>
+01648 db += (<a class="code" href="a04558.html#a10">sint32</a>) ((1.0 - <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr2">_Alpha</a>) * db1 + <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr2">_Alpha</a> * db2);
+01649
+01650 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr2">_Alpha</a> &lt; 0.0) {
+01651 <span class="keywordtype">double</span> amp3 = <a class="code" href="a04061.html#a0">min</a> / dist; <span class="comment">// linear amplitude is 1/distance</span>
+01652 <span class="keywordtype">double</span> db3 = 2000.0 * log10(amp3); <span class="comment">// covert to 1/100th decibels</span>
+01653 db += (<a class="code" href="a04558.html#a10">sint32</a>) ((1.0 + <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr2">_Alpha</a>) * db1 - <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr2">_Alpha</a> * db3);
+01654 }
+01655
+01656 <a class="code" href="a05378.html#a374">clamp</a>(db, DSBVOLUME_MIN, DSBVOLUME_MAX);
+01657
+01658 <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundr18">_SecondaryBuffer</a>-&gt;SetVolume(db);
+01659
+01660 <span class="comment">/* LONG tmp;</span>
+01661 <span class="comment"> _SecondaryBuffer-&gt;GetVolume(&amp;tmp);</span>
+01662 <span class="comment">*/</span>
+01663
+01664 <span class="comment">//nlwarning("VOLUME = %d dB, rolloff = %0.2f", db/100, CListenerDSound::instance()-&gt;getRolloffFactor());</span>
+01665 }
+01666
+01667 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundd19" doxytag="NLSOUND::CSourceDSound::xfade" ></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::CSourceDSound::xfade </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03432.html">TLockedBufferInfo</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>lbi</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a8">sint16</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>src</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [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="a06429.html#l00562">562</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+References <a class="el" href="a06429.html#l00074">_XFadeSize</a>, <a class="el" href="a05646.html#l01173">alpha</a>, <a class="el" href="a05646.html#l00240">count</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06430.html#l00308">NLSOUND::CSourceDSound::TLockedBufferInfo::Ptr1</a>, <a class="el" href="a06430.html#l00312">NLSOUND::CSourceDSound::TLockedBufferInfo::Ptr2</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00097">sint16</a>, <a class="el" href="a06430.html#l00309">NLSOUND::CSourceDSound::TLockedBufferInfo::Size1</a>, <a class="el" href="a06430.html#l00313">NLSOUND::CSourceDSound::TLockedBufferInfo::Size2</a>, <a class="el" href="a05646.html#l01124">src</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00688">play()</a>.
+<p>
+<div class="fragment"><pre>00563 {
+00564 <span class="comment">// do the XFade in integer fixed point arithmetic</span>
+00565
+00566 <a class="code" href="a04199.html#a6">nlassert</a>((_XFadeSize &amp; 0x1) == 0);
+00567 <a class="code" href="a04558.html#a15">uint</a> fade = <a class="code" href="a03430.html#NLSOUND_1_1CSourceDSoundv7">_XFadeSize</a>;
+00568 <a class="code" href="a04558.html#a8">sint16</a> *ptr = lbi.Ptr1;
+00569 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a577">count</a> = lbi.Size1 /2;
+00570 <a class="code" href="a04558.html#a14">sint</a> <a class="code" href="a04223.html#a663">alpha</a>, invAlpha;
+00571
+00572 <span class="keywordflow">while</span> (fade &amp;&amp; <a class="code" href="a04223.html#a577">count</a>)
+00573 {
+00574 <a class="code" href="a04223.html#a663">alpha</a> = (fade&lt;&lt;16) / _XFadeSize;
+00575 invAlpha = 0x10000 - <a class="code" href="a04223.html#a663">alpha</a>;
+00576 *ptr = (<a class="code" href="a05167.html#a16">sint</a>(*ptr)*<a class="code" href="a04223.html#a663">alpha</a> + <a class="code" href="a05167.html#a16">sint</a>(*src) * invAlpha) &gt;&gt; 16;
+00577 ++<a class="code" href="a04223.html#a652">src</a>;
+00578 ++ptr;
+00579 --<a class="code" href="a04223.html#a577">count</a>;
+00580 --fade;
+00581 }
+00582
+00583 ptr = lbi.Ptr2;
+00584 <a class="code" href="a04223.html#a577">count</a> = lbi.Size2 /2;
+00585
+00586 <span class="keywordflow">while</span> (fade &amp;&amp; <a class="code" href="a04223.html#a577">count</a>)
+00587 {
+00588 <a class="code" href="a04223.html#a663">alpha</a> = (fade&lt;&lt;16) / _XFadeSize;
+00589 invAlpha = 0x10000 - <a class="code" href="a04223.html#a663">alpha</a>;
+00590 *ptr = (<a class="code" href="a05167.html#a16">sint</a>(*ptr)*<a class="code" href="a04223.html#a663">alpha</a> + <a class="code" href="a05167.html#a16">sint</a>(*src) * invAlpha) &gt;&gt; 16;
+00591 ++<a class="code" href="a04223.html#a652">src</a>;
+00592 ++ptr;
+00593 --<a class="code" href="a04223.html#a577">count</a>;
+00594 --fade;
+00595 }
+00596 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Friends And Related Function Documentation</h2>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundn0" doxytag="NLSOUND::CSourceDSound::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"> friend class <a class="el" href="a03420.html">CSoundDriverDSound</a><code> [friend]</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="a06430.html#l00102">102</a> of file <a class="el" href="a06430.html">source_dsound.h</a>. </td>
+ </tr>
+</table>
+<hr><h2>Field Documentation</h2>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr0" doxytag="NLSOUND::CSourceDSound::_3DBuffer" ></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"> LPDIRECTSOUND3DBUFFER <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr0">NLSOUND::CSourceDSound::_3DBuffer</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="a06430.html#l00413">413</a> of file <a class="el" href="a06430.html">source_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00111">CSourceDSound()</a>, <a class="el" href="a06429.html#l01745">getCone()</a>, <a class="el" href="a06429.html#l01398">getDirection()</a>, <a class="el" href="a06429.html#l01580">getMinMaxDistances()</a>, <a class="el" href="a06429.html#l01534">getSourceRelativeMode()</a>, <a class="el" href="a06429.html#l01355">getVelocity()</a>, <a class="el" href="a06429.html#l00218">init()</a>, <a class="el" href="a06429.html#l00171">release()</a>, <a class="el" href="a06429.html#l01671">setCone()</a>, <a class="el" href="a06429.html#l01380">setDirection()</a>, <a class="el" href="a06429.html#l01558">setMinMaxDistances()</a>, <a class="el" href="a06429.html#l01313">setPos()</a>, <a class="el" href="a06429.html#l01505">setSourceRelativeMode()</a>, and <a class="el" href="a06429.html#l01341">setVelocity()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr1" doxytag="NLSOUND::CSourceDSound::_ADPCMState" ></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="a03845.html">IBuffer::TADPCMState</a> <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr1">NLSOUND::CSourceDSound::_ADPCMState</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="a06430.html#l00418">418</a> of file <a class="el" href="a06430.html">source_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00432">fillData()</a>, <a class="el" href="a06429.html#l00688">play()</a>, <a class="el" href="a06429.html#l00342">setStaticBuffer()</a>, and <a class="el" href="a06429.html#l01059">update()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr2" doxytag="NLSOUND::CSourceDSound::_Alpha" ></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"> double <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr2">NLSOUND::CSourceDSound::_Alpha</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="a06430.html#l00458">458</a> of file <a class="el" href="a06430.html">source_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00111">CSourceDSound()</a>, <a class="el" href="a06430.html#l00265">setAlpha()</a>, and <a class="el" href="a06429.html#l01608">updateVolume()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr3" doxytag="NLSOUND::CSourceDSound::_CriticalSection" ></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"> CRITICAL_SECTION <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr3">NLSOUND::CSourceDSound::_CriticalSection</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="a06430.html#l00415">415</a> of file <a class="el" href="a06430.html">source_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00111">CSourceDSound()</a>, <a class="el" href="a06429.html#l00688">play()</a>, <a class="el" href="a06429.html#l00342">setStaticBuffer()</a>, <a class="el" href="a06429.html#l00827">stop()</a>, <a class="el" href="a06429.html#l01059">update()</a>, and <a class="el" href="a06429.html#l00152">~CSourceDSound()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundv0" doxytag="NLSOUND::CSourceDSound::_DefaultChannels" ></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#a15">uint</a> <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundv0">NLSOUND::CSourceDSound::_DefaultChannels</a> = 1<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="a06429.html#l00075">75</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00218">init()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundv1" doxytag="NLSOUND::CSourceDSound::_DefaultSampleRate" ></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#a15">uint</a> <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundv1">NLSOUND::CSourceDSound::_DefaultSampleRate</a> = 22050<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="a06429.html#l00076">76</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00111">CSourceDSound()</a>, and <a class="el" href="a06429.html#l00218">init()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundv2" doxytag="NLSOUND::CSourceDSound::_DefaultSampleSize" ></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#a15">uint</a> <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundv2">NLSOUND::CSourceDSound::_DefaultSampleSize</a> = 16<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="a06429.html#l00077">77</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00218">init()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr4" doxytag="NLSOUND::CSourceDSound::_FillOffset" ></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="a03430.html#NLSOUND_1_1CSourceDSoundr4">NLSOUND::CSourceDSound::_FillOffset</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="a06430.html#l00394">394</a> of file <a class="el" href="a06430.html">source_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00662">advanceFill()</a>, <a class="el" href="a06429.html#l00111">CSourceDSound()</a>, <a class="el" href="a06429.html#l00688">play()</a>, <a class="el" href="a06429.html#l00827">stop()</a>, and <a class="el" href="a06429.html#l01059">update()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr5" doxytag="NLSOUND::CSourceDSound::_Format" ></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="a05381.html#a80">TSampleFormat</a> <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr5">NLSOUND::CSourceDSound::_Format</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="a06430.html#l00381">381</a> of file <a class="el" href="a06430.html">source_dsound.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr6" doxytag="NLSOUND::CSourceDSound::_Freq" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr6">NLSOUND::CSourceDSound::_Freq</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="a06430.html#l00386">386</a> of file <a class="el" href="a06430.html">source_dsound.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr7" doxytag="NLSOUND::CSourceDSound::_Gain" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr7">NLSOUND::CSourceDSound::_Gain</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="a06430.html#l00457">457</a> of file <a class="el" href="a06430.html">source_dsound.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr8" doxytag="NLSOUND::CSourceDSound::_LastPlayPos" ></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="a03430.html#NLSOUND_1_1CSourceDSoundr8">NLSOUND::CSourceDSound::_LastPlayPos</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="a06430.html#l00393">393</a> of file <a class="el" href="a06430.html">source_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00111">CSourceDSound()</a>, <a class="el" href="a06429.html#l00688">play()</a>, and <a class="el" href="a06429.html#l01059">update()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1ISourcep0" doxytag="NLSOUND::CSourceDSound::_Loader" ></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="a03862.html">ILoader</a>* <a class="el" href="a03428.html#NLSOUND_1_1ISourcep0">NLSOUND::ISource::_Loader</a><code> [protected, inherited]</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="a06424.html#l00170">170</a> of file <a class="el" href="a06424.html">source.h</a>.
+<p>
+Referenced by <a class="el" href="a06424.html#l00159">NLSOUND::ISource::ISource()</a>, <a class="el" href="a06424.html#l00076">NLSOUND::ISource::setStreamLoader()</a>, and <a class="el" href="a06424.html#l00162">NLSOUND::ISource::~ISource()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr9" doxytag="NLSOUND::CSourceDSound::_Loop" ></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="a03430.html#NLSOUND_1_1CSourceDSoundr9">NLSOUND::CSourceDSound::_Loop</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="a06430.html#l00401">401</a> of file <a class="el" href="a06430.html">source_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00111">CSourceDSound()</a>, <a class="el" href="a06429.html#l00874">getLooping()</a>, <a class="el" href="a06429.html#l00688">play()</a>, <a class="el" href="a06429.html#l00866">setLooping()</a>, and <a class="el" href="a06429.html#l01059">update()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr10" doxytag="NLSOUND::CSourceDSound::_NextSample" ></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>* <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr10">NLSOUND::CSourceDSound::_NextSample</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="a06430.html#l00391">391</a> of file <a class="el" href="a06430.html">source_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00409">getStaticBuffer()</a>, <a class="el" href="a06429.html#l00688">play()</a>, and <a class="el" href="a06429.html#l00342">setStaticBuffer()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr11" doxytag="NLSOUND::CSourceDSound::_PlayOffset" ></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="a03430.html#NLSOUND_1_1CSourceDSoundr11">NLSOUND::CSourceDSound::_PlayOffset</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="a06430.html#l00380">380</a> of file <a class="el" href="a06430.html">source_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00111">CSourceDSound()</a>, <a class="el" href="a06429.html#l00203">getTime()</a>, <a class="el" href="a06429.html#l00688">play()</a>, <a class="el" href="a06429.html#l00342">setStaticBuffer()</a>, and <a class="el" href="a06429.html#l01059">update()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr12" doxytag="NLSOUND::CSourceDSound::_Pos" ></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="a03128.html">NLMISC::CVector</a> <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr12">NLSOUND::CSourceDSound::_Pos</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="a06430.html#l00459">459</a> of file <a class="el" href="a06430.html">source_dsound.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr13" doxytag="NLSOUND::CSourceDSound::_Sample" ></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>* <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr13">NLSOUND::CSourceDSound::_Sample</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="a06430.html#l00374">374</a> of file <a class="el" href="a06430.html">source_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00111">CSourceDSound()</a>, <a class="el" href="a06429.html#l00432">fillData()</a>, <a class="el" href="a06429.html#l01803">getBuffer()</a>, <a class="el" href="a06429.html#l01480">getPitch()</a>, <a class="el" href="a06429.html#l00409">getStaticBuffer()</a>, <a class="el" href="a06429.html#l00203">getTime()</a>, <a class="el" href="a06429.html#l00688">play()</a>, <a class="el" href="a06429.html#l01454">setPitch()</a>, and <a class="el" href="a06429.html#l00342">setStaticBuffer()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr14" doxytag="NLSOUND::CSourceDSound::_SampleFreq" ></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="a03430.html#NLSOUND_1_1CSourceDSoundr14">NLSOUND::CSourceDSound::_SampleFreq</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="a06430.html#l00382">382</a> of file <a class="el" href="a06430.html">source_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00111">CSourceDSound()</a>, <a class="el" href="a06429.html#l00688">play()</a>, and <a class="el" href="a06429.html#l00342">setStaticBuffer()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr15" doxytag="NLSOUND::CSourceDSound::_SampleOffset" ></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="a03430.html#NLSOUND_1_1CSourceDSoundr15">NLSOUND::CSourceDSound::_SampleOffset</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="a06430.html#l00378">378</a> of file <a class="el" href="a06430.html">source_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00111">CSourceDSound()</a>, <a class="el" href="a06429.html#l00432">fillData()</a>, <a class="el" href="a06429.html#l00688">play()</a>, <a class="el" href="a06429.html#l00342">setStaticBuffer()</a>, and <a class="el" href="a06429.html#l01059">update()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr16" doxytag="NLSOUND::CSourceDSound::_SampleRate" ></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="a03430.html#NLSOUND_1_1CSourceDSoundr16">NLSOUND::CSourceDSound::_SampleRate</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="a06430.html#l00388">388</a> of file <a class="el" href="a06430.html">source_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00111">CSourceDSound()</a>, and <a class="el" href="a06429.html#l01454">setPitch()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr17" doxytag="NLSOUND::CSourceDSound::_SampleSize" ></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="a03430.html#NLSOUND_1_1CSourceDSoundr17">NLSOUND::CSourceDSound::_SampleSize</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="a06430.html#l00376">376</a> of file <a class="el" href="a06430.html">source_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00111">CSourceDSound()</a>, <a class="el" href="a06429.html#l00432">fillData()</a>, <a class="el" href="a06429.html#l00688">play()</a>, <a class="el" href="a06429.html#l00342">setStaticBuffer()</a>, and <a class="el" href="a06429.html#l01059">update()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr18" doxytag="NLSOUND::CSourceDSound::_SecondaryBuffer" ></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="a03430.html#NLSOUND_1_1CSourceDSoundr18">NLSOUND::CSourceDSound::_SecondaryBuffer</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="a06430.html#l00407">407</a> of file <a class="el" href="a06430.html">source_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00111">CSourceDSound()</a>, <a class="el" href="a06429.html#l00419">getCursors()</a>, <a class="el" href="a06429.html#l01480">getPitch()</a>, <a class="el" href="a06429.html#l00218">init()</a>, <a class="el" href="a06429.html#l01811">lock()</a>, <a class="el" href="a06429.html#l00171">release()</a>, <a class="el" href="a06429.html#l01454">setPitch()</a>, <a class="el" href="a06429.html#l01868">unlock()</a>, and <a class="el" href="a06429.html#l01608">updateVolume()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundv3" doxytag="NLSOUND::CSourceDSound::_SecondaryBufferSize" ></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="a03430.html#NLSOUND_1_1CSourceDSoundv3">NLSOUND::CSourceDSound::_SecondaryBufferSize</a> = 0x10000<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="a06429.html#l00070">70</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00662">advanceFill()</a>, <a class="el" href="a06429.html#l00218">init()</a>, and <a class="el" href="a06429.html#l01059">update()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr19" doxytag="NLSOUND::CSourceDSound::_SilenceWriten" ></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="a03430.html#NLSOUND_1_1CSourceDSoundr19">NLSOUND::CSourceDSound::_SilenceWriten</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="a06430.html#l00395">395</a> of file <a class="el" href="a06430.html">source_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00688">play()</a>, <a class="el" href="a06429.html#l00827">stop()</a>, and <a class="el" href="a06429.html#l01059">update()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundv4" doxytag="NLSOUND::CSourceDSound::_SizeMask" ></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="a03430.html#NLSOUND_1_1CSourceDSoundv4">NLSOUND::CSourceDSound::_SizeMask</a> = 0xffff<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="a06429.html#l00071">71</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00662">advanceFill()</a>, <a class="el" href="a06429.html#l00419">getCursors()</a>, and <a class="el" href="a06429.html#l01059">update()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr20" doxytag="NLSOUND::CSourceDSound::_SourceName" ></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="a03430.html#NLSOUND_1_1CSourceDSoundr20">NLSOUND::CSourceDSound::_SourceName</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="a06430.html#l00365">365</a> of file <a class="el" href="a06430.html">source_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06430.html#l00242">sourceName()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr21" doxytag="NLSOUND::CSourceDSound::_State" ></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="a03430.html#NLSOUND_1_1CSourceDSoundy4">TSourceState</a> <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr21">NLSOUND::CSourceDSound::_State</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="a06430.html#l00368">368</a> of file <a class="el" href="a06430.html">source_dsound.h</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00111">CSourceDSound()</a>, <a class="el" href="a06429.html#l00409">getStaticBuffer()</a>, <a class="el" href="a06429.html#l01021">isPlaying()</a>, <a class="el" href="a06429.html#l01041">isStopped()</a>, <a class="el" href="a06429.html#l01050">needsUpdate()</a>, <a class="el" href="a06429.html#l00688">play()</a>, <a class="el" href="a06429.html#l00342">setStaticBuffer()</a>, <a class="el" href="a06429.html#l00827">stop()</a>, and <a class="el" href="a06429.html#l01059">update()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundv5" doxytag="NLSOUND::CSourceDSound::_SwapCopySize" ></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="a03430.html#NLSOUND_1_1CSourceDSoundv5">NLSOUND::CSourceDSound::_SwapCopySize</a> = 0x8000<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="a06429.html#l00072">72</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundv6" doxytag="NLSOUND::CSourceDSound::_UpdateCopySize" ></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="a03430.html#NLSOUND_1_1CSourceDSoundv6">NLSOUND::CSourceDSound::_UpdateCopySize</a> = 0x4000<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="a06429.html#l00073">73</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00419">getCursors()</a>, and <a class="el" href="a06429.html#l01059">update()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundr22" doxytag="NLSOUND::CSourceDSound::_Volume" ></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#a10">sint32</a> <a class="el" href="a03430.html#NLSOUND_1_1CSourceDSoundr22">NLSOUND::CSourceDSound::_Volume</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="a06430.html#l00456">456</a> of file <a class="el" href="a06430.html">source_dsound.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLSOUND_1_1CSourceDSoundv7" doxytag="NLSOUND::CSourceDSound::_XFadeSize" ></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="a03430.html#NLSOUND_1_1CSourceDSoundv7">NLSOUND::CSourceDSound::_XFadeSize</a> = 64<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="a06429.html#l00074">74</a> of file <a class="el" href="a06429.html">source_dsound.cpp</a>.
+<p>
+Referenced by <a class="el" href="a06429.html#l00627">fadeIn()</a>, <a class="el" href="a06429.html#l00598">fadeOut()</a>, <a class="el" href="a06429.html#l00688">play()</a>, <a class="el" href="a06429.html#l00827">stop()</a>, <a class="el" href="a06429.html#l01059">update()</a>, and <a class="el" href="a06429.html#l00562">xfade()</a>. </td>
+ </tr>
+</table>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="a06430.html">source_dsound.h</a><li><a class="el" href="a06429.html">source_dsound.cpp</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 14:49:17 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>