diff options
Diffstat (limited to 'docs/doxygen/nel/a02253.html')
-rw-r--r-- | docs/doxygen/nel/a02253.html | 2314 |
1 files changed, 2314 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a02253.html b/docs/doxygen/nel/a02253.html new file mode 100644 index 00000000..a2112105 --- /dev/null +++ b/docs/doxygen/nel/a02253.html @@ -0,0 +1,2314 @@ +<!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::CBackgroundSource class Reference</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.3.6 --> +<div class="qindex"> <form class="search" action="search.php" method="get"> +<a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a> | <span class="search"><u>S</u>earch for <input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div> +<h1>NLSOUND::CBackgroundSource Class Reference</h1><code>#include <<a class="el" href="a05474.html">background_source.h</a>></code> +<p> +<p>Inheritance diagram for NLSOUND::CBackgroundSource: +<p><center><img src="a02253.png" usemap="#NLSOUND::CBackgroundSource_map" border="0" alt=""></center> +<map name="NLSOUND::CBackgroundSource_map"> +<area href="a02254.html" alt="NLSOUND::CSourceCommon" shape="rect" coords="0,56,258,80"> +<area href="a02239.html" alt="NLSOUND::CAudioMixerUser::IMixerUpdate" shape="rect" coords="268,56,526,80"> +<area href="a03429.html" alt="NLSOUND::USource" shape="rect" coords="0,0,258,24"> +<area href="a02425.html" alt="NLMISC::CDbgRefCount< IMixerUpdate >" shape="rect" coords="268,0,526,24"> +</map> +<hr><a name="_details"></a><h2>Detailed Description</h2> +Implemetation class for background source. Complex source are source that use a CPatternSound object. <dl compact><dt><b>Author:</b></dt><dd>Boris Boucher. <p> +Nevrax </dd></dl> + +<p> + +<p> +Definition at line <a class="el" href="a05474.html#l00044">44</a> of file <a class="el" href="a05474.html">background_source.h</a>.<table border=0 cellpadding=0 cellspacing=0> +<tr><td></td></tr> +<tr><td colspan=2><br><h2>Public Types</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonw3">TSOURCE_TYPE</a> { <a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonw3NLSOUND_1_1CSourceCommonw2">SOURCE_SIMPLE</a>, +<a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonw3NLSOUND_1_1CSourceCommonw1">SOURCE_COMPLEX</a>, +<a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonw3NLSOUND_1_1CSourceCommonw0">SOURCE_BACKGROUND</a> + }</td></tr> + +<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcea0">CBackgroundSource</a> (<a class="el" href="a02245.html">CBackgroundSound</a> *backgroundSound=NULL, bool spawn=false, <a class="el" href="a05381.html#a63">TSpawnEndCallback</a> cb=0, void *cbUserParam=0, <a class="el" href="a02362.html">NL3D::CCluster</a> *cluster=0)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#NLSOUND_1_1CBackgroundSourcea0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona0">checkup</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void * </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona2">getCallbackUserParam</a> (void) const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">return the user param for the user callback <a href="#NLSOUND_1_1CSourceCommona2"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02362.html">NL3D::CCluster</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona3">getCluster</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona4">getDirection</a> (<a class="el" href="a03128.html">NLMISC::CVector</a> &dir) const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the direction vector. <a href="#NLSOUND_1_1CSourceCommona4"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual float </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona5">getGain</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the gain. <a href="#NLSOUND_1_1CSourceCommona5"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona6">getLooping</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the looping state. <a href="#NLSOUND_1_1CSourceCommona6"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual float </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona7">getPitch</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the pitch. <a href="#NLSOUND_1_1CSourceCommona7"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03128.html">NLMISC::CVector</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona8">getPos</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the position vector (3D mode only). <a href="#NLSOUND_1_1CSourceCommona8"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a05381.html#a82">TSoundPriority</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona9">getPriority</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the priority. <a href="#NLSOUND_1_1CSourceCommona9"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona10">getRelativeGain</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the relative gain (see <a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona26">setRelativeGain()</a>), or the absolute gain if getSource() is null. <a href="#NLSOUND_1_1CSourceCommona10"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a02246.html">TSoundId</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcea11">getSound</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the sound binded to the source (or NULL if there is no sound). <a href="#NLSOUND_1_1CBackgroundSourcea11"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona12">getSourceRelativeMode</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the source relative mode. <a href="#NLSOUND_1_1CSourceCommona12"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona13">getTime</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of milliseconds the source has been playing. <a href="#NLSOUND_1_1CSourceCommona13"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonw3">TSOURCE_TYPE</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcea14">getType</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the type the the source. <a href="#NLSOUND_1_1CBackgroundSourcea14"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona15">getVelocity</a> (<a class="el" href="a03128.html">NLMISC::CVector</a> &vel) const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the velocity vector. <a href="#NLSOUND_1_1CSourceCommona15"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona16">isPlaying</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get playing state. Return false even if the source has stopped on its own. <a href="#NLSOUND_1_1CSourceCommona16"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona17">isSpawn</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the spawn state. <a href="#NLSOUND_1_1CSourceCommona17"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcea18">play</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Play. <a href="#NLSOUND_1_1CBackgroundSourcea18"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona19">set3DPositionVector</a> (const <a class="el" href="a03128.html">NLMISC::CVector</a> *pos)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the position vector to return for a stereo source (default: NULL). <a href="#NLSOUND_1_1CSourceCommona19"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcea20">setDirection</a> (const <a class="el" href="a03128.html">NLMISC::CVector</a> &dir)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the direction vector (3D mode only, ignored in stereo mode) (default: (0,0,0) as non-directional). <a href="#NLSOUND_1_1CBackgroundSourcea20"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcea21">setGain</a> (float gain)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona22">setLooping</a> (bool loop)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Set looping on/off for future playbacks (default: off). <a href="#NLSOUND_1_1CSourceCommona22"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona23">setPitch</a> (float pitch)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcea24">setPos</a> (const <a class="el" href="a03128.html">NLMISC::CVector</a> &pos)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona25">setPriority</a> (<a class="el" href="a05381.html#a82">TSoundPriority</a> pr)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Change the priority of the source. <a href="#NLSOUND_1_1CSourceCommona25"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcea26">setRelativeGain</a> (float gain)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona27">setSourceRelativeMode</a> (bool mode)</td></tr> + +<tr><td class="mdescLeft"> </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_1CSourceCommona27"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcea28">setVelocity</a> (const <a class="el" href="a03128.html">NLMISC::CVector</a> &vel)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the velocity vector (3D mode only, ignored in stereo mode) (default: (0,0,0)). <a href="#NLSOUND_1_1CBackgroundSourcea28"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcea29">stop</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Stop playing. <a href="#NLSOUND_1_1CBackgroundSourcea29"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona30">unregisterSpawnCallBack</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Tells this source not to call its callbacks when it ends. This is valid for spawned sources only. <a href="#NLSOUND_1_1CSourceCommona30"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcea31">updateFilterValues</a> (const float *filterValues)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcea32">~CBackgroundSource</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#NLSOUND_1_1CBackgroundSourcea32"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03128.html">NLMISC::CVector</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp0">_3DPosition</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void * </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp1">_CbUserParam</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02362.html">NL3D::CCluster</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp2">_Cluster</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03128.html">NLMISC::CVector</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp3">_Direction</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp4">_Gain</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp5">_InitialGain</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Gain not affected by setRelativeGain and used to compute _Gain. <a href="#NLSOUND_1_1CSourceCommonp5"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp6">_Looping</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp7">_Pitch</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp8">_Playing</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a05378.html#a242">NLMISC::TTime</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp9">_PlayStart</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03128.html">NLMISC::CVector</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp10">_Position</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a05381.html#a82">TSoundPriority</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp11">_Priority</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp12">_RelativeMode</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp13">_Spawn</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a05381.html#a63">TSpawnEndCallback</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp14">_SpawnEndCb</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a05378.html#a236">NLMISC::TStringId</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp15">_UserVarControler</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">An optional user var controler. <a href="#NLSOUND_1_1CSourceCommonp15"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03128.html">NLMISC::CVector</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp16">_Velocity</a></td></tr> + +<tr><td colspan=2><br><h2>Private Types</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom><a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3">TSubSourceStatus</a> { <a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey0">SUB_STATUS_PLAY</a>, +<a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey2">SUB_STATUS_STOP</a>, +<a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey1">SUB_STATUS_PLAY_FAIL</a> + }</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Sub source possible status. <a href="#NLSOUND_1_1CBackgroundSourcey3">More...</a><br><br></td></tr> +<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourced0">onUpdate</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Mixer update. <a href="#NLSOUND_1_1CBackgroundSourced0"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02245.html">CBackgroundSound</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcer0">_BackgroundSound</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">The sound static data. <a href="#NLSOUND_1_1CBackgroundSourcer0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< <a class="el" href="a02255.html">TSubSource</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcer1">_Sources</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">The sub sources container. <a href="#NLSOUND_1_1CBackgroundSourcer1"></a><br><br></td></tr> +</table> +<hr><h2>Member Enumeration Documentation</h2> +<a class="anchor" name="NLSOUND_1_1CSourceCommonw3" doxytag="NLSOUND::CBackgroundSource::TSOURCE_TYPE" ></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="a02254.html#NLSOUND_1_1CSourceCommonw3">NLSOUND::CSourceCommon::TSOURCE_TYPE</a><code> [inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </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_1CSourceCommonw3NLSOUND_1_1CSourceCommonw2" doxytag="SOURCE_SIMPLE" ></a>SOURCE_SIMPLE</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NLSOUND_1_1CSourceCommonw3NLSOUND_1_1CSourceCommonw1" doxytag="SOURCE_COMPLEX" ></a>SOURCE_COMPLEX</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NLSOUND_1_1CSourceCommonw3NLSOUND_1_1CSourceCommonw0" doxytag="SOURCE_BACKGROUND" ></a>SOURCE_BACKGROUND</em> </td><td> +</td></tr> +</table> +</dl> + +<p> +Definition at line <a class="el" href="a06428.html#l00042">42</a> of file <a class="el" href="a06428.html">source_common.h</a>. +<p> +<div class="fragment"><pre>00043 { +00044 <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonw3NLSOUND_1_1CSourceCommonw2">SOURCE_SIMPLE</a>, +00045 <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonw3NLSOUND_1_1CSourceCommonw1">SOURCE_COMPLEX</a>, +00046 <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonw3NLSOUND_1_1CSourceCommonw0">SOURCE_BACKGROUND</a> +00047 }; +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CBackgroundSourcey3" doxytag="NLSOUND::CBackgroundSource::TSubSourceStatus" ></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="a02253.html#NLSOUND_1_1CBackgroundSourcey3">NLSOUND::CBackgroundSource::TSubSourceStatus</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Sub source possible status. +<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_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey0" doxytag="SUB_STATUS_PLAY" ></a>SUB_STATUS_PLAY</em> </td><td> +The sub source is playing. </td></tr> +<tr><td valign=top><em><a class="anchor" name="NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey2" doxytag="SUB_STATUS_STOP" ></a>SUB_STATUS_STOP</em> </td><td> +The sub source is stopped : it is masked by environnemt status. </td></tr> +<tr><td valign=top><em><a class="anchor" name="NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey1" doxytag="SUB_STATUS_PLAY_FAIL" ></a>SUB_STATUS_PLAY_FAIL</em> </td><td> +The sub source have fail to play, either because of distance or no available track... </td></tr> +</table> +</dl> + +<p> +Definition at line <a class="el" href="a05474.html#l00077">77</a> of file <a class="el" href="a05474.html">background_source.h</a>. +<p> +<div class="fragment"><pre>00078 { +00080 <a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey0">SUB_STATUS_PLAY</a>, +00082 <a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey2">SUB_STATUS_STOP</a>, +00084 <a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey1">SUB_STATUS_PLAY_FAIL</a> +00085 }; +</pre></div> </td> + </tr> +</table> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="NLSOUND_1_1CBackgroundSourcea0" doxytag="NLSOUND::CBackgroundSource::CBackgroundSource" ></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::CBackgroundSource::CBackgroundSource </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02245.html">CBackgroundSound</a> * </td> + <td class="mdname" nowrap> <em>backgroundSound</em> = NULL, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>spawn</em> = false, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a05381.html#a63">TSpawnEndCallback</a> </td> + <td class="mdname" nowrap> <em>cb</em> = 0, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>void * </td> + <td class="mdname" nowrap> <em>cbUserParam</em> = 0, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02362.html">NL3D::CCluster</a> * </td> + <td class="mdname" nowrap> <em>cluster</em> = 0</td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Constructor. +<p> + +<p> +Definition at line <a class="el" href="a05473.html#l00038">38</a> of file <a class="el" href="a05473.html">background_source.cpp</a>. +<p> +References <a class="el" href="a05474.html#l00099">_BackgroundSound</a>, and <a class="el" href="a06630.html#l00076">NLSOUND::TSpawnEndCallback</a>. +<p> +<div class="fragment"><pre>00039 : <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommona1">CSourceCommon</a>(backgroundSound, spawn, cb, cbUserParam, cluster) +00040 { +00041 <a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcer0">_BackgroundSound</a> = backgroundSound; +00042 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CBackgroundSourcea32" doxytag="NLSOUND::CBackgroundSource::~CBackgroundSource" ></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::CBackgroundSource::~<a class="el" href="a02253.html">CBackgroundSource</a> </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Destructor. +<p> + +<p> +Definition at line <a class="el" href="a05473.html#l00044">44</a> of file <a class="el" href="a05473.html">background_source.cpp</a>. +<p> +References <a class="el" href="a05473.html#l00145">stop()</a>. +<p> +<div class="fragment"><pre>00045 { +00046 <span class="keywordflow">if</span> (<a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp8">_Playing</a>) +00047 <a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcea29">stop</a>(); +00048 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="NLSOUND_1_1CSourceCommona0" doxytag="NLSOUND::CBackgroundSource::checkup" ></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::CSourceCommon::checkup </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +This method is called from backgroup sound to check if subsound need to be restarted (ie subsound in loop mode). +<p> +Reimplemented in <a class="el" href="a02394.html#NLSOUND_1_1CComplexSourcez1303_0">NLSOUND::CComplexSource</a>. +<p> +Definition at line <a class="el" href="a06428.html#l00103">103</a> of file <a class="el" href="a06428.html">source_common.h</a>. +<p> +Referenced by <a class="el" href="a05471.html#l00861">NLSOUND::CBackgroundSoundManager::updateBackgroundStatus()</a>. +<p> +<div class="fragment"><pre>00103 {}; +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommona2" doxytag="NLSOUND::CBackgroundSource::getCallbackUserParam" ></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::CSourceCommon::getCallbackUserParam </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">void </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +return the user param for the user callback +<p> + +<p> +Definition at line <a class="el" href="a06428.html#l00074">74</a> of file <a class="el" href="a06428.html">source_common.h</a>. +<p> +References <a class="el" href="a06428.html#l00130">NLSOUND::CSourceCommon::_CbUserParam</a>. +<p> +<div class="fragment"><pre>00074 { <span class="keywordflow">return</span> <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp1">_CbUserParam</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommona3" doxytag="NLSOUND::CBackgroundSource::getCluster" ></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="a02362.html">NL3D::CCluster</a>* NLSOUND::CSourceCommon::getCluster </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06428.html#l00098">98</a> of file <a class="el" href="a06428.html">source_common.h</a>. +<p> +References <a class="el" href="a06428.html#l00131">NLSOUND::CSourceCommon::_Cluster</a>. +<p> +Referenced by <a class="el" href="a06390.html#l00103">NLSOUND::CSimpleSource::getVirtualPos()</a>, and <a class="el" href="a05465.html#l01268">NLSOUND::CAudioMixerUser::update()</a>. +<p> +<div class="fragment"><pre>00098 { <span class="keywordflow">return</span> <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp2">_Cluster</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommona4" doxytag="NLSOUND::CBackgroundSource::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"> virtual void NLSOUND::CSourceCommon::getDirection </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03128.html">NLMISC::CVector</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>dir</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get the direction vector. +<p> + +<p> +Implements <a class="el" href="a03429.html#NLSOUND_1_1USourcez2139_0">NLSOUND::USource</a>. +<p> +Definition at line <a class="el" href="a06428.html#l00080">80</a> of file <a class="el" href="a06428.html">source_common.h</a>. +<p> +<div class="fragment"><pre>00080 { dir = <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp3">_Direction</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommona5" doxytag="NLSOUND::CBackgroundSource::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"> virtual float NLSOUND::CSourceCommon::getGain </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">void </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get the gain. +<p> + +<p> +Implements <a class="el" href="a03429.html#NLSOUND_1_1USourcez2139_1">NLSOUND::USource</a>. +<p> +Definition at line <a class="el" href="a06428.html#l00082">82</a> of file <a class="el" href="a06428.html">source_common.h</a>. +<p> +Referenced by <a class="el" href="a05465.html#l01268">NLSOUND::CAudioMixerUser::update()</a>. +<p> +<div class="fragment"><pre>00082 { <span class="keywordflow">return</span> <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp4">_Gain</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommona6" doxytag="NLSOUND::CBackgroundSource::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::CSourceCommon::getLooping </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the looping state. +<p> + +<p> +Implements <a class="el" href="a03429.html#NLSOUND_1_1USourcez2137_0">NLSOUND::USource</a>. +<p> +Definition at line <a class="el" href="a06427.html#l00099">99</a> of file <a class="el" href="a06427.html">source_common.cpp</a>. +<p> +<div class="fragment"><pre>00100 { +00101 <span class="keywordflow">return</span> <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp6">_Looping</a>; +00102 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommona7" doxytag="NLSOUND::CBackgroundSource::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"> virtual float NLSOUND::CSourceCommon::getPitch </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">void </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get the pitch. +<p> + +<p> +Implements <a class="el" href="a03429.html#NLSOUND_1_1USourcez2139_2">NLSOUND::USource</a>. +<p> +Definition at line <a class="el" href="a06428.html#l00084">84</a> of file <a class="el" href="a06428.html">source_common.h</a>. +<p> +<div class="fragment"><pre>00084 { <span class="keywordflow">return</span> <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp7">_Pitch</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommona8" doxytag="NLSOUND::CBackgroundSource::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> & NLSOUND::CSourceCommon::getPos </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get the position vector (3D mode only). +<p> + +<p> +Implements <a class="el" href="a03429.html#NLSOUND_1_1USourcez2139_3">NLSOUND::USource</a>. +<p> +Definition at line <a class="el" href="a06427.html#l00141">141</a> of file <a class="el" href="a06427.html">source_common.cpp</a>. +<p> +References <a class="el" href="a06428.html#l00125">NLSOUND::CSourceCommon::_3DPosition</a>. +<p> +Referenced by <a class="el" href="a05465.html#l01152">NLSOUND::CAudioMixerUser::getFreeTrack()</a>, <a class="el" href="a05465.html#l01230">NLSOUND::CAudioMixerUser::getPlayingSoundsPos()</a>, <a class="el" href="a06390.html#l00103">NLSOUND::CSimpleSource::getVirtualPos()</a>, <a class="el" href="a05465.html#l01946">NLSOUND::CompareSources::operator()()</a>, and <a class="el" href="a05465.html#l01268">NLSOUND::CAudioMixerUser::update()</a>. +<p> +<div class="fragment"><pre>00142 { +00143 <span class="keywordflow">if</span> ( <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp0">_3DPosition</a> == NULL ) +00144 { +00145 <span class="keywordflow">return</span> <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp10">_Position</a>; +00146 } +00147 <span class="keywordflow">else</span> +00148 { +00149 <span class="keywordflow">return</span> *<a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp0">_3DPosition</a>; +00150 } +00151 +00152 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommona9" doxytag="NLSOUND::CBackgroundSource::getPriority" ></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#a82">TSoundPriority</a> NLSOUND::CSourceCommon::getPriority </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">void </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the priority. +<p> + +<p> +Definition at line <a class="el" href="a06428.html#l00059">59</a> of file <a class="el" href="a06428.html">source_common.h</a>. +<p> +References <a class="el" href="a06630.html#l00072">NLSOUND::TSoundPriority</a>. +<p> +Referenced by <a class="el" href="a05465.html#l01217">NLSOUND::CAudioMixerUser::freeTrack()</a>, <a class="el" href="a05465.html#l01152">NLSOUND::CAudioMixerUser::getFreeTrack()</a>, and <a class="el" href="a05465.html#l01946">NLSOUND::CompareSources::operator()()</a>. +<p> +<div class="fragment"><pre>00059 { <span class="keywordflow">return</span> <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp11">_Priority</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommona10" doxytag="NLSOUND::CBackgroundSource::getRelativeGain" ></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::CSourceCommon::getRelativeGain </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the relative gain (see <a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona26">setRelativeGain()</a>), or the absolute gain if getSource() is null. +<p> + +<p> +Implements <a class="el" href="a03429.html#NLSOUND_1_1USourcez2139_4">NLSOUND::USource</a>. +<p> +Definition at line <a class="el" href="a06427.html#l00205">205</a> of file <a class="el" href="a06427.html">source_common.cpp</a>. +<p> +References <a class="el" href="a06428.html#l00119">NLSOUND::CSourceCommon::_InitialGain</a>. +<p> +Referenced by <a class="el" href="a05465.html#l01017">NLSOUND::CAudioMixerUser::addUserControledSource()</a>, and <a class="el" href="a05465.html#l01268">NLSOUND::CAudioMixerUser::update()</a>. +<p> +<div class="fragment"><pre>00206 { +00207 <span class="keywordflow">if</span> (<a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp5">_InitialGain</a> == 0.0f) +00208 <span class="keywordflow">return</span> 0.0f; +00209 <span class="keywordflow">else</span> +00210 <span class="keywordflow">return</span> <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp4">_Gain</a> / <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp5">_InitialGain</a>; +00211 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CBackgroundSourcea11" doxytag="NLSOUND::CBackgroundSource::getSound" ></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="a02246.html">TSoundId</a> NLSOUND::CBackgroundSource::getSound </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the sound binded to the source (or NULL if there is no sound). +<p> + +<p> +Implements <a class="el" href="a03429.html#NLSOUND_1_1USourcea0">NLSOUND::USource</a>. +<p> +Definition at line <a class="el" href="a05473.html#l00050">50</a> of file <a class="el" href="a05473.html">background_source.cpp</a>. +<p> +References <a class="el" href="a06630.html#l00069">NLSOUND::TSoundId</a>. +<p> +<div class="fragment"><pre>00051 { +00052 <span class="keywordflow">return</span> NULL; +00053 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommona12" doxytag="NLSOUND::CBackgroundSource::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"> virtual bool NLSOUND::CSourceCommon::getSourceRelativeMode </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get the source relative mode. +<p> + +<p> +Implements <a class="el" href="a03429.html#NLSOUND_1_1USourcez2139_5">NLSOUND::USource</a>. +<p> +Definition at line <a class="el" href="a06428.html#l00086">86</a> of file <a class="el" href="a06428.html">source_common.h</a>. +<p> +References <a class="el" href="a06428.html#l00116">NLSOUND::CSourceCommon::_RelativeMode</a>. +<p> +<div class="fragment"><pre>00086 { <span class="keywordflow">return</span> <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp12">_RelativeMode</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommona13" doxytag="NLSOUND::CBackgroundSource::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::CSourceCommon::getTime </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns the number of milliseconds the source has been playing. +<p> + +<p> +Implements <a class="el" href="a03429.html#NLSOUND_1_1USourcez2137_1">NLSOUND::USource</a>. +<p> +Reimplemented in <a class="el" href="a02394.html#NLSOUND_1_1CComplexSourcez1301_0">NLSOUND::CComplexSource</a>, and <a class="el" href="a03395.html#NLSOUND_1_1CSimpleSourcez1338_1">NLSOUND::CSimpleSource</a>. +<p> +Definition at line <a class="el" href="a06427.html#l00222">222</a> of file <a class="el" href="a06427.html">source_common.cpp</a>. +<p> +References <a class="el" href="a06428.html#l00122">NLSOUND::CSourceCommon::_PlayStart</a>, and <a class="el" href="a05981.html#l00100">uint32</a>. +<p> +<div class="fragment"><pre>00223 { +00224 <span class="keywordflow">if</span> (!<a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp8">_Playing</a>) +00225 <span class="keywordflow">return</span> 0; +00226 <span class="comment">// default implementation</span> +00227 <span class="keywordflow">return</span> <a class="code" href="a05167.html#a13">uint32</a>(CTime::getLocalTime() - _PlayStart); +00228 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CBackgroundSourcea14" doxytag="NLSOUND::CBackgroundSource::getType" ></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="a02254.html#NLSOUND_1_1CSourceCommonw3">TSOURCE_TYPE</a> NLSOUND::CBackgroundSource::getType </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get the type the the source. +<p> + +<p> +Implements <a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona14">NLSOUND::CSourceCommon</a>. +<p> +Definition at line <a class="el" href="a05474.html#l00059">59</a> of file <a class="el" href="a05474.html">background_source.h</a>. +<p> +<div class="fragment"><pre>00059 {<span class="keywordflow">return</span> <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonw3NLSOUND_1_1CSourceCommonw0">SOURCE_BACKGROUND</a>;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommona15" doxytag="NLSOUND::CBackgroundSource::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"> virtual void NLSOUND::CSourceCommon::getVelocity </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03128.html">NLMISC::CVector</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>vel</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get the velocity vector. +<p> + +<p> +Implements <a class="el" href="a03429.html#NLSOUND_1_1USourcez2139_6">NLSOUND::USource</a>. +<p> +Definition at line <a class="el" href="a06428.html#l00078">78</a> of file <a class="el" href="a06428.html">source_common.h</a>. +<p> +References <a class="el" href="a06428.html#l00112">NLSOUND::CSourceCommon::_Velocity</a>. +<p> +<div class="fragment"><pre>00078 { vel = <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp16">_Velocity</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommona16" doxytag="NLSOUND::CBackgroundSource::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::CSourceCommon::isPlaying </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get playing state. Return false even if the source has stopped on its own. +<p> + +<p> +Implements <a class="el" href="a03429.html#NLSOUND_1_1USourcez2137_2">NLSOUND::USource</a>. +<p> +Reimplemented in <a class="el" href="a02394.html#NLSOUND_1_1CComplexSourcez1301_1">NLSOUND::CComplexSource</a>, and <a class="el" href="a03395.html#NLSOUND_1_1CSimpleSourcez1338_2">NLSOUND::CSimpleSource</a>. +<p> +Definition at line <a class="el" href="a06428.html#l00064">64</a> of file <a class="el" href="a06428.html">source_common.h</a>. +<p> +Referenced by <a class="el" href="a05465.html#l00288">NLSOUND::CAudioMixerUser::reset()</a>, and <a class="el" href="a05471.html#l00861">NLSOUND::CBackgroundSoundManager::updateBackgroundStatus()</a>. +<p> +<div class="fragment"><pre>00064 { <span class="keywordflow">return</span> <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp8">_Playing</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommona17" doxytag="NLSOUND::CBackgroundSource::isSpawn" ></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::CSourceCommon::isSpawn </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the spawn state. +<p> + +<p> +Definition at line <a class="el" href="a06428.html#l00090">90</a> of file <a class="el" href="a06428.html">source_common.h</a>. +<p> +<div class="fragment"><pre>00090 { <span class="keywordflow">return</span> <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp13">_Spawn</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CBackgroundSourced0" doxytag="NLSOUND::CBackgroundSource::onUpdate" ></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::CBackgroundSource::onUpdate </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [private, virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Mixer update. +<p> + +<p> +Implements <a class="el" href="a02239.html#NLSOUND_1_1CAudioMixerUser_1_1IMixerUpdatea0">NLSOUND::CAudioMixerUser::IMixerUpdate</a>. +<p> +Definition at line <a class="el" href="a05473.html#l00222">222</a> of file <a class="el" href="a05473.html">background_source.cpp</a>. +<p> +References <a class="el" href="a03429.html#NLSOUND_1_1USourcez2137_2">NLSOUND::USource::isPlaying()</a>, <a class="el" href="a03429.html#NLSOUND_1_1USourcez2137_3">NLSOUND::USource::play()</a>, <a class="el" href="a05474.html#l00091">NLSOUND::CBackgroundSource::TSubSource::Source</a>, <a class="el" href="a05474.html#l00093">NLSOUND::CBackgroundSource::TSubSource::Status</a>, <a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey0">SUB_STATUS_PLAY</a>, and <a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey1">SUB_STATUS_PLAY_FAIL</a>. +<p> +<div class="fragment"><pre>00223 { +00224 <span class="keywordtype">bool</span> needUpdate = <span class="keyword">false</span>; +00225 <span class="comment">// Some sub source are distance clipped, so retry to start them.</span> +00226 std::vector<TSubSource>::iterator first(<a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcer1">_Sources</a>.begin()), last(<a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcer1">_Sources</a>.end()); +00227 <span class="keywordflow">for</span> (; first != last; ++first) +00228 { +00229 TSubSource &ss = *first; +00230 <span class="keywordflow">if</span> (ss.Status == <a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey1">SUB_STATUS_PLAY_FAIL</a>) +00231 { +00232 ss.Source->play(); +00233 <span class="comment">// some sub sound can be too far from the listener, </span> +00234 <span class="comment">// we must handle this in order to start them when the listener</span> +00235 <span class="comment">// is closer</span> +00236 ss.Status = ss.Source->isPlaying() ? <a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey0">SUB_STATUS_PLAY</a> : <a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey1">SUB_STATUS_PLAY_FAIL</a>; +00237 +00238 needUpdate |= (ss.Status == <a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey1">SUB_STATUS_PLAY_FAIL</a>); +00239 } +00240 } +00241 +00242 <span class="comment">// no more update needed ?</span> +00243 <span class="keywordflow">if</span> (!needUpdate) +00244 CAudioMixerUser::instance()->unregisterUpdate(<span class="keyword">this</span>); +00245 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CBackgroundSourcea18" doxytag="NLSOUND::CBackgroundSource::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"> void NLSOUND::CBackgroundSource::play </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Play. +<p> + +<p> +Reimplemented from <a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona18">NLSOUND::CSourceCommon</a>. +<p> +Definition at line <a class="el" href="a05473.html#l00119">119</a> of file <a class="el" href="a05473.html">background_source.cpp</a>. +<p> +References <a class="el" href="a05474.html#l00099">_BackgroundSound</a>, <a class="el" href="a05465.html#l01732">NLSOUND::CAudioMixerUser::createSource()</a>, <a class="el" href="a05474.html#l00095">NLSOUND::CBackgroundSource::TSubSource::Filter</a>, <a class="el" href="a05466.html#l00279">NLSOUND::CAudioMixerUser::getBackgroundSoundManager()</a>, <a class="el" href="a05472.html#l00139">NLSOUND::CBackgroundSoundManager::getFilterValues()</a>, <a class="el" href="a05470.html#l00095">NLSOUND::CBackgroundSound::getSounds()</a>, <a class="el" href="a03429.html#NLSOUND_1_1USourcea1">NLSOUND::USource::setPriority()</a>, <a class="el" href="a05474.html#l00091">NLSOUND::CBackgroundSource::TSubSource::Source</a>, <a class="el" href="a05474.html#l00093">NLSOUND::CBackgroundSource::TSubSource::Status</a>, <a class="el" href="a05473.html#l00145">stop()</a>, <a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey2">SUB_STATUS_STOP</a>, and <a class="el" href="a05473.html#l00165">updateFilterValues()</a>. +<p> +<div class="fragment"><pre>00120 { +00121 <span class="keywordflow">if</span> (<a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp8">_Playing</a>) +00122 <a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcea29">stop</a>(); +00123 +00124 CAudioMixerUser *mixer = CAudioMixerUser::instance(); +00125 +00126 <span class="keyword">const</span> vector<CBackgroundSound::TSoundInfo> &sounds = <a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcer0">_BackgroundSound</a>->getSounds(); +00127 vector<CBackgroundSound::TSoundInfo>::const_iterator first(sounds.begin()), last(sounds.end()); +00128 +00129 <span class="keywordflow">for</span> (; first != last; ++first) +00130 { +00131 TSubSource subSource; +00132 subSource.Source = mixer->createSource(first->SoundName, <span class="keyword">false</span>, 0, 0, _Cluster, 0); +00133 <span class="keywordflow">if</span> (subSource.Source != NULL) +00134 subSource.Source->setPriority(_Priority); +00135 subSource.Filter = first->Filter; +00136 subSource.Status = <a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey2">SUB_STATUS_STOP</a>; +00137 <a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcer1">_Sources</a>.push_back(subSource); +00138 } +00139 +00140 <a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcea31">updateFilterValues</a>(mixer->getBackgroundSoundManager()->getFilterValues()); +00141 +00142 CSourceCommon::play(); +00143 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommona19" doxytag="NLSOUND::CBackgroundSource::set3DPositionVector" ></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::CSourceCommon::set3DPositionVector </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">NLMISC::CVector</a> * </td> + <td class="mdname1" valign="top" nowrap> <em>pos</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Set the position vector to return for a stereo source (default: NULL). +<p> + +<p> +Definition at line <a class="el" href="a06428.html#l00088">88</a> of file <a class="el" href="a06428.html">source_common.h</a>. +<p> +References <a class="el" href="a06428.html#l00125">NLSOUND::CSourceCommon::_3DPosition</a>. +<p> +Referenced by <a class="el" href="a05465.html#l01576">NLSOUND::CAudioMixerUser::createSource()</a>, and <a class="el" href="a05427.html#l00092">NLSOUND::CAmbiantSource::initPos()</a>. +<p> +<div class="fragment"><pre>00088 { <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp0">_3DPosition</a> = pos; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CBackgroundSourcea20" doxytag="NLSOUND::CBackgroundSource::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::CBackgroundSource::setDirection </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">NLMISC::CVector</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>dir</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Set the direction vector (3D mode only, ignored in stereo mode) (default: (0,0,0) as non-directional). +<p> + +<p> +Reimplemented from <a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona20">NLSOUND::CSourceCommon</a>. +<p> +Definition at line <a class="el" href="a05473.html#l00105">105</a> of file <a class="el" href="a05473.html">background_source.cpp</a>. +<p> +<div class="fragment"><pre>00106 { +00107 CSourceCommon::setDirection(dir); +00108 +00109 std::vector<TSubSource>::iterator first(<a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcer1">_Sources</a>.begin()), last(<a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcer1">_Sources</a>.end()); +00110 <span class="keywordflow">for</span> (; first != last; ++first) +00111 { +00112 <span class="keywordflow">if</span> (first->Source != 0) +00113 first->Source->setDirection(dir); +00114 } +00115 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CBackgroundSourcea21" doxytag="NLSOUND::CBackgroundSource::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::CBackgroundSource::setGain </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">float </td> + <td class="mdname1" valign="top" nowrap> <em>gain</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Set the gain (volume value inside [0 , 1]). (default: 1) 0.0 -> silence 0.5 -> -6dB 1.0 -> no attenuation values > 1 (amplification) not supported by most drivers +<p> +Reimplemented from <a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona21">NLSOUND::CSourceCommon</a>. +<p> +Definition at line <a class="el" href="a05473.html#l00055">55</a> of file <a class="el" href="a05473.html">background_source.cpp</a>. +<p> +<div class="fragment"><pre>00056 { +00057 CSourceCommon::setGain(gain); +00058 +00059 std::vector<TSubSource>::iterator first(<a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcer1">_Sources</a>.begin()), last(<a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcer1">_Sources</a>.end()); +00060 <span class="keywordflow">for</span> (; first != last; ++first) +00061 { +00062 <span class="keywordflow">if</span> (first->Source != 0) +00063 { +00064 first->Source->setGain(first->Source->getSound()->getGain() * gain); +00065 first->Source->setRelativeGain(_Gain); +00066 } +00067 <span class="comment">// first->Source->setRelativeGain(_Gain);</span> +00068 } +00069 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommona22" doxytag="NLSOUND::CBackgroundSource::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::CSourceCommon::setLooping </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">bool </td> + <td class="mdname1" valign="top" nowrap> <em>loop</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Set looping on/off for future playbacks (default: off). +<p> + +<p> +Implements <a class="el" href="a03429.html#NLSOUND_1_1USourcez2137_4">NLSOUND::USource</a>. +<p> +Reimplemented in <a class="el" href="a03395.html#NLSOUND_1_1CSimpleSourcez1338_4">NLSOUND::CSimpleSource</a>. +<p> +Definition at line <a class="el" href="a06427.html#l00091">91</a> of file <a class="el" href="a06427.html">source_common.cpp</a>. +<p> +<div class="fragment"><pre>00092 { +00093 <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp6">_Looping</a> = <a class="code" href="a05373.html#a2">l</a>; +00094 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommona23" doxytag="NLSOUND::CBackgroundSource::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::CSourceCommon::setPitch </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">float </td> + <td class="mdname1" valign="top" nowrap> <em>pitch</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </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="a03429.html#NLSOUND_1_1USourcez2139_9">NLSOUND::USource</a>. +<p> +Reimplemented in <a class="el" href="a03395.html#NLSOUND_1_1CSimpleSourcez1340_6">NLSOUND::CSimpleSource</a>. +<p> +Definition at line <a class="el" href="a06427.html#l00157">157</a> of file <a class="el" href="a06427.html">source_common.cpp</a>. +<p> +Referenced by <a class="el" href="a05465.html#l01017">NLSOUND::CAudioMixerUser::addUserControledSource()</a>. +<p> +<div class="fragment"><pre>00158 { +00159 <span class="comment">// nlassert( (pitch > 0) && (pitch <= 1.0f ) );</span> +00160 <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp7">_Pitch</a> = pitch; +00161 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CBackgroundSourcea24" doxytag="NLSOUND::CBackgroundSource::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::CBackgroundSource::setPos </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">NLMISC::CVector</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>pos</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Set the position vector (default: (0,0,0)). 3D mode -> 3D position st mode -> x is the pan value (from left (-1) to right (1)), set y and z to 0 +<p> +Reimplemented from <a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona24">NLSOUND::CSourceCommon</a>. +<p> +Definition at line <a class="el" href="a05473.html#l00082">82</a> of file <a class="el" href="a05473.html">background_source.cpp</a>. +<p> +<div class="fragment"><pre>00083 { +00084 CSourceCommon::setPos(pos); +00085 +00086 std::vector<TSubSource>::iterator first(<a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcer1">_Sources</a>.begin()), last(<a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcer1">_Sources</a>.end()); +00087 <span class="keywordflow">for</span> (; first != last; ++first) +00088 { +00089 <span class="keywordflow">if</span> (first->Source != 0) +00090 first->Source->setPos(pos); +00091 } +00092 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommona25" doxytag="NLSOUND::CBackgroundSource::setPriority" ></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::CSourceCommon::setPriority </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a05381.html#a82">TSoundPriority</a> </td> + <td class="mdname1" valign="top" nowrap> <em>pr</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Change the priority of the source. +<p> + +<p> +Implements <a class="el" href="a03429.html#NLSOUND_1_1USourcea1">NLSOUND::USource</a>. +<p> +Definition at line <a class="el" href="a06427.html#l00076">76</a> of file <a class="el" href="a06427.html">source_common.cpp</a>. +<p> +Referenced by <a class="el" href="a05427.html#l00130">NLSOUND::CAmbiantSource::enable()</a>, <a class="el" href="a05427.html#l00092">NLSOUND::CAmbiantSource::initPos()</a>, and <a class="el" href="a05427.html#l00239">NLSOUND::CAmbiantSource::update()</a>. +<p> +<div class="fragment"><pre>00077 { +00078 <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp11">_Priority</a> = pr; +00079 +00080 <span class="comment">// The AudioMixer redispatches as necessary in the update() function [PH]</span> +00081 <span class="comment">// Redispatch the tracks if needed</span> +00082 <span class="comment">//if ( redispatch )</span> +00083 <span class="comment">//{</span> +00084 <span class="comment">// CAudioMixerUser::instance()->balanceSources();</span> +00085 <span class="comment">//}</span> +00086 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CBackgroundSourcea26" doxytag="NLSOUND::CBackgroundSource::setRelativeGain" ></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::CBackgroundSource::setRelativeGain </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">float </td> + <td class="mdname1" valign="top" nowrap> <em>gain</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Set the gain amount (value inside [0, 1]) to map between 0 and the nominal gain (which is getSource()-><a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona5">getGain()</a>). Does nothing if getSource() is null. +<p> +Reimplemented from <a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona26">NLSOUND::CSourceCommon</a>. +<p> +Definition at line <a class="el" href="a05473.html#l00070">70</a> of file <a class="el" href="a05473.html">background_source.cpp</a>. +<p> +<div class="fragment"><pre>00071 { +00072 CSourceCommon::setRelativeGain(gain); +00073 +00074 std::vector<TSubSource>::iterator first(<a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcer1">_Sources</a>.begin()), last(<a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcer1">_Sources</a>.end()); +00075 <span class="keywordflow">for</span> (; first != last; ++first) +00076 { +00077 <span class="keywordflow">if</span> (first->Source != 0) +00078 first->Source->setRelativeGain(_Gain); +00079 } +00080 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommona27" doxytag="NLSOUND::CBackgroundSource::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::CSourceCommon::setSourceRelativeMode </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">bool </td> + <td class="mdname1" valign="top" nowrap> <em>mode</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </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="a03429.html#NLSOUND_1_1USourcez2139_12">NLSOUND::USource</a>. +<p> +Reimplemented in <a class="el" href="a03395.html#NLSOUND_1_1CSimpleSourcez1340_9">NLSOUND::CSimpleSource</a>. +<p> +Definition at line <a class="el" href="a06427.html#l00216">216</a> of file <a class="el" href="a06427.html">source_common.cpp</a>. +<p> +References <a class="el" href="a06428.html#l00116">NLSOUND::CSourceCommon::_RelativeMode</a>. +<p> +<div class="fragment"><pre>00217 { +00218 <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp12">_RelativeMode</a> = mode; +00219 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CBackgroundSourcea28" doxytag="NLSOUND::CBackgroundSource::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::CBackgroundSource::setVelocity </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">NLMISC::CVector</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>vel</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Set the velocity vector (3D mode only, ignored in stereo mode) (default: (0,0,0)). +<p> + +<p> +Reimplemented from <a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona28">NLSOUND::CSourceCommon</a>. +<p> +Definition at line <a class="el" href="a05473.html#l00094">94</a> of file <a class="el" href="a05473.html">background_source.cpp</a>. +<p> +<div class="fragment"><pre>00095 { +00096 CSourceCommon::setVelocity(vel); +00097 +00098 std::vector<TSubSource>::iterator first(<a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcer1">_Sources</a>.begin()), last(<a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcer1">_Sources</a>.end()); +00099 <span class="keywordflow">for</span> (; first != last; ++first) +00100 { +00101 <span class="keywordflow">if</span> (first->Source != 0) +00102 first->Source->setVelocity(vel); +00103 } +00104 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CBackgroundSourcea29" doxytag="NLSOUND::CBackgroundSource::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::CBackgroundSource::stop </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Stop playing. +<p> + +<p> +Reimplemented from <a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona29">NLSOUND::CSourceCommon</a>. +<p> +Definition at line <a class="el" href="a05473.html#l00145">145</a> of file <a class="el" href="a05473.html">background_source.cpp</a>. +<p> +References <a class="el" href="a05474.html#l00091">NLSOUND::CBackgroundSource::TSubSource::Source</a>. +<p> +Referenced by <a class="el" href="a05473.html#l00119">play()</a>, and <a class="el" href="a05473.html#l00044">~CBackgroundSource()</a>. +<p> +<div class="fragment"><pre>00146 { +00147 <span class="keywordflow">if</span> (<a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp8">_Playing</a>) +00148 { +00149 <span class="keywordflow">while</span> (!<a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcer1">_Sources</a>.empty()) +00150 { +00151 TSubSource &subSource = <a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcer1">_Sources</a>.back(); +00152 <span class="keywordflow">if</span> (subSource.Source != NULL) +00153 { +00154 <span class="keyword">delete</span> subSource.Source; +00155 } +00156 <a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcer1">_Sources</a>.pop_back(); +00157 } +00158 } +00159 +00160 CSourceCommon::stop(); +00161 +00162 CAudioMixerUser::instance()->unregisterUpdate(<span class="keyword">this</span>); +00163 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommona30" doxytag="NLSOUND::CBackgroundSource::unregisterSpawnCallBack" ></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::CSourceCommon::unregisterSpawnCallBack </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Tells this source not to call its callbacks when it ends. This is valid for spawned sources only. +<p> + +<p> +Implements <a class="el" href="a03429.html#NLSOUND_1_1USourcez2137_6">NLSOUND::USource</a>. +<p> +Definition at line <a class="el" href="a06428.html#l00076">76</a> of file <a class="el" href="a06428.html">source_common.h</a>. +<p> +References <a class="el" href="a06428.html#l00129">NLSOUND::CSourceCommon::_SpawnEndCb</a>. +<p> +<div class="fragment"><pre>00076 { <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp14">_SpawnEndCb</a> = NULL; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CBackgroundSourcea31" doxytag="NLSOUND::CBackgroundSource::updateFilterValues" ></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::CBackgroundSource::updateFilterValues </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const float * </td> + <td class="mdname1" valign="top" nowrap> <em>filterValues</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05473.html#l00165">165</a> of file <a class="el" href="a05473.html">background_source.cpp</a>. +<p> +References <a class="el" href="a05474.html#l00095">NLSOUND::CBackgroundSource::TSubSource::Filter</a>, <a class="el" href="a06594.html#l00097">NLSOUND::UAudioMixer::TBackgroundFlags::Flags</a>, <a class="el" href="a06407.html#l00090">NLSOUND::CSound::getGain()</a>, <a class="el" href="a06407.html#l00092">NLSOUND::CSound::getPitch()</a>, <a class="el" href="a03429.html#NLSOUND_1_1USourcea0">NLSOUND::USource::getSound()</a>, <a class="el" href="a03429.html#NLSOUND_1_1USourcez2137_2">NLSOUND::USource::isPlaying()</a>, <a class="el" href="a03429.html#NLSOUND_1_1USourcez2137_3">NLSOUND::USource::play()</a>, <a class="el" href="a03429.html#NLSOUND_1_1USourcez2139_8">NLSOUND::USource::setGain()</a>, <a class="el" href="a03429.html#NLSOUND_1_1USourcez2139_9">NLSOUND::USource::setPitch()</a>, <a class="el" href="a03429.html#NLSOUND_1_1USourcez2139_10">NLSOUND::USource::setPos()</a>, <a class="el" href="a03429.html#NLSOUND_1_1USourcez2139_11">NLSOUND::USource::setRelativeGain()</a>, <a class="el" href="a05474.html#l00091">NLSOUND::CBackgroundSource::TSubSource::Source</a>, <a class="el" href="a05474.html#l00093">NLSOUND::CBackgroundSource::TSubSource::Status</a>, <a class="el" href="a03429.html#NLSOUND_1_1USourcez2137_5">NLSOUND::USource::stop()</a>, <a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey0">SUB_STATUS_PLAY</a>, <a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey1">SUB_STATUS_PLAY_FAIL</a>, <a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey2">SUB_STATUS_STOP</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a05473.html#l00119">play()</a>. +<p> +<div class="fragment"><pre>00166 { +00167 <span class="keywordtype">bool</span> needUpdate = <span class="keyword">false</span>; +00168 std::vector<TSubSource>::iterator first(<a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcer1">_Sources</a>.begin()), last(<a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcer1">_Sources</a>.end()); +00169 <span class="keywordflow">for</span> (; first != last; ++first) +00170 { +00171 TSubSource &ss = *first; +00172 <span class="keywordflow">if</span> (ss.Source != 0) +00173 { +00174 <span class="keywordtype">float</span> gain = 1.0f; +00175 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i<UAudioMixer::TBackgroundFlags::NB_BACKGROUND_FLAGS; ++i) +00176 { +00177 <span class="keywordflow">if</span> (ss.Filter.Flags[i]) +00178 { +00179 <span class="comment">// this filter is used</span> +00180 gain *= filterValues[i]; +00181 } +00182 } +00183 +00184 <span class="keywordflow">if</span> (gain == 0 && ss.Status != <a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey2">SUB_STATUS_STOP</a>) +00185 { +00186 <span class="comment">// need to completely stop the sound</span> +00187 <span class="keywordflow">if</span> (ss.Source->isPlaying()) +00188 ss.Source->stop(); +00189 ss.Status = <a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey2">SUB_STATUS_STOP</a>; +00190 } +00191 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (gain > 0 && ss.Status != <a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey0">SUB_STATUS_PLAY</a>) +00192 { +00193 <span class="comment">// need to restard the sound</span> +00194 <span class="comment">// ss.Source->setRelativeGain(gain * _Gain);</span> +00195 ss.Source->setGain(ss.Source->getSound()->getGain() * gain); +00196 ss.Source->setRelativeGain(_Gain); +00197 ss.Source->setPitch(ss.Source->getSound()->getPitch() * <a class="code" href="a02254.html#NLSOUND_1_1CSourceCommonp7">_Pitch</a>); +00198 ss.Source->setPos(_Position); +00199 ss.Source->play(); +00200 <span class="comment">// some sub sound can be too far from the listener, </span> +00201 <span class="comment">// we must handle this in order to start them when the listener</span> +00202 <span class="comment">// is closer</span> +00203 ss.Status = ss.Source->isPlaying() ? <a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey0">SUB_STATUS_PLAY</a> : <a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey1">SUB_STATUS_PLAY_FAIL</a>; +00204 +00205 needUpdate |= (ss.Status == <a class="code" href="a02253.html#NLSOUND_1_1CBackgroundSourcey3NLSOUND_1_1CBackgroundSourcey1">SUB_STATUS_PLAY_FAIL</a>); +00206 } +00207 <span class="keywordflow">else</span> <span class="comment">//if (ss.Status == SUB_STATUS_PLAY)</span> +00208 { +00209 <span class="comment">// just update the gain</span> +00210 ss.Source->setGain(ss.Source->getSound()->getGain() * gain); +00211 ss.Source->setRelativeGain(_Gain); +00212 } +00213 } +00214 } +00215 +00216 <span class="comment">// if some some sub sound fail to play...</span> +00217 <span class="keywordflow">if</span> (needUpdate) +00218 CAudioMixerUser::instance()->registerUpdate(<span class="keyword">this</span>); +00219 +00220 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Field Documentation</h2> +<a class="anchor" name="NLSOUND_1_1CSourceCommonp0" doxytag="NLSOUND::CBackgroundSource::_3DPosition" ></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>* <a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp0">NLSOUND::CSourceCommon::_3DPosition</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06428.html#l00125">125</a> of file <a class="el" href="a06428.html">source_common.h</a>. +<p> +Referenced by <a class="el" href="a06427.html#l00141">NLSOUND::CSourceCommon::getPos()</a>, and <a class="el" href="a06428.html#l00088">NLSOUND::CSourceCommon::set3DPositionVector()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CBackgroundSourcer0" doxytag="NLSOUND::CBackgroundSource::_BackgroundSound" ></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="a02245.html">CBackgroundSound</a>* <a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcer0">NLSOUND::CBackgroundSource::_BackgroundSound</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +The sound static data. +<p> + +<p> +Definition at line <a class="el" href="a05474.html#l00099">99</a> of file <a class="el" href="a05474.html">background_source.h</a>. +<p> +Referenced by <a class="el" href="a05473.html#l00038">CBackgroundSource()</a>, and <a class="el" href="a05473.html#l00119">play()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommonp1" doxytag="NLSOUND::CBackgroundSource::_CbUserParam" ></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* <a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp1">NLSOUND::CSourceCommon::_CbUserParam</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06428.html#l00130">130</a> of file <a class="el" href="a06428.html">source_common.h</a>. +<p> +Referenced by <a class="el" href="a06428.html#l00074">NLSOUND::CSourceCommon::getCallbackUserParam()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommonp2" doxytag="NLSOUND::CBackgroundSource::_Cluster" ></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="a02362.html">NL3D::CCluster</a>* <a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp2">NLSOUND::CSourceCommon::_Cluster</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06428.html#l00131">131</a> of file <a class="el" href="a06428.html">source_common.h</a>. +<p> +Referenced by <a class="el" href="a06428.html#l00098">NLSOUND::CSourceCommon::getCluster()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommonp3" doxytag="NLSOUND::CBackgroundSource::_Direction" ></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="a02254.html#NLSOUND_1_1CSourceCommonp3">NLSOUND::CSourceCommon::_Direction</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06428.html#l00113">113</a> of file <a class="el" href="a06428.html">source_common.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommonp4" doxytag="NLSOUND::CBackgroundSource::_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="a02254.html#NLSOUND_1_1CSourceCommonp4">NLSOUND::CSourceCommon::_Gain</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06428.html#l00114">114</a> of file <a class="el" href="a06428.html">source_common.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommonp5" doxytag="NLSOUND::CBackgroundSource::_InitialGain" ></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="a02254.html#NLSOUND_1_1CSourceCommonp5">NLSOUND::CSourceCommon::_InitialGain</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Gain not affected by setRelativeGain and used to compute _Gain. +<p> + +<p> +Definition at line <a class="el" href="a06428.html#l00119">119</a> of file <a class="el" href="a06428.html">source_common.h</a>. +<p> +Referenced by <a class="el" href="a06427.html#l00037">NLSOUND::CSourceCommon::CSourceCommon()</a>, <a class="el" href="a06427.html#l00205">NLSOUND::CSourceCommon::getRelativeGain()</a>, <a class="el" href="a06427.html#l00186">NLSOUND::CSourceCommon::setGain()</a>, and <a class="el" href="a06427.html#l00195">NLSOUND::CSourceCommon::setRelativeGain()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommonp6" doxytag="NLSOUND::CBackgroundSource::_Looping" ></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="a02254.html#NLSOUND_1_1CSourceCommonp6">NLSOUND::CSourceCommon::_Looping</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06428.html#l00109">109</a> of file <a class="el" href="a06428.html">source_common.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommonp7" doxytag="NLSOUND::CBackgroundSource::_Pitch" ></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="a02254.html#NLSOUND_1_1CSourceCommonp7">NLSOUND::CSourceCommon::_Pitch</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06428.html#l00115">115</a> of file <a class="el" href="a06428.html">source_common.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommonp8" doxytag="NLSOUND::CBackgroundSource::_Playing" ></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="a02254.html#NLSOUND_1_1CSourceCommonp8">NLSOUND::CSourceCommon::_Playing</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06428.html#l00108">108</a> of file <a class="el" href="a06428.html">source_common.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommonp9" doxytag="NLSOUND::CBackgroundSource::_PlayStart" ></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="a05378.html#a242">NLMISC::TTime</a> <a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp9">NLSOUND::CSourceCommon::_PlayStart</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06428.html#l00122">122</a> of file <a class="el" href="a06428.html">source_common.h</a>. +<p> +Referenced by <a class="el" href="a06427.html#l00222">NLSOUND::CSourceCommon::getTime()</a>, and <a class="el" href="a06427.html#l00107">NLSOUND::CSourceCommon::play()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommonp10" doxytag="NLSOUND::CBackgroundSource::_Position" ></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="a02254.html#NLSOUND_1_1CSourceCommonp10">NLSOUND::CSourceCommon::_Position</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06428.html#l00111">111</a> of file <a class="el" href="a06428.html">source_common.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommonp11" doxytag="NLSOUND::CBackgroundSource::_Priority" ></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#a82">TSoundPriority</a> <a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp11">NLSOUND::CSourceCommon::_Priority</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06428.html#l00107">107</a> of file <a class="el" href="a06428.html">source_common.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommonp12" doxytag="NLSOUND::CBackgroundSource::_RelativeMode" ></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="a02254.html#NLSOUND_1_1CSourceCommonp12">NLSOUND::CSourceCommon::_RelativeMode</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06428.html#l00116">116</a> of file <a class="el" href="a06428.html">source_common.h</a>. +<p> +Referenced by <a class="el" href="a06428.html#l00086">NLSOUND::CSourceCommon::getSourceRelativeMode()</a>, and <a class="el" href="a06427.html#l00216">NLSOUND::CSourceCommon::setSourceRelativeMode()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CBackgroundSourcer1" doxytag="NLSOUND::CBackgroundSource::_Sources" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> std::vector<<a class="el" href="a02255.html">TSubSource</a>> <a class="el" href="a02253.html#NLSOUND_1_1CBackgroundSourcer1">NLSOUND::CBackgroundSource::_Sources</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +The sub sources container. +<p> + +<p> +Definition at line <a class="el" href="a05474.html#l00102">102</a> of file <a class="el" href="a05474.html">background_source.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommonp13" doxytag="NLSOUND::CBackgroundSource::_Spawn" ></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 bool <a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp13">NLSOUND::CSourceCommon::_Spawn</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06428.html#l00128">128</a> of file <a class="el" href="a06428.html">source_common.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommonp14" doxytag="NLSOUND::CBackgroundSource::_SpawnEndCb" ></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#a63">TSpawnEndCallback</a> <a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp14">NLSOUND::CSourceCommon::_SpawnEndCb</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06428.html#l00129">129</a> of file <a class="el" href="a06428.html">source_common.h</a>. +<p> +Referenced by <a class="el" href="a06390.html#l00126">NLSOUND::CSimpleSource::play()</a>, <a class="el" href="a06390.html#l00217">NLSOUND::CSimpleSource::stop()</a>, and <a class="el" href="a06428.html#l00076">NLSOUND::CSourceCommon::unregisterSpawnCallBack()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommonp15" doxytag="NLSOUND::CBackgroundSource::_UserVarControler" ></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="a05378.html#a236">NLMISC::TStringId</a> <a class="el" href="a02254.html#NLSOUND_1_1CSourceCommonp15">NLSOUND::CSourceCommon::_UserVarControler</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +An optional user var controler. +<p> + +<p> +Definition at line <a class="el" href="a06428.html#l00134">134</a> of file <a class="el" href="a06428.html">source_common.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CSourceCommonp16" doxytag="NLSOUND::CBackgroundSource::_Velocity" ></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="a02254.html#NLSOUND_1_1CSourceCommonp16">NLSOUND::CSourceCommon::_Velocity</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06428.html#l00112">112</a> of file <a class="el" href="a06428.html">source_common.h</a>. +<p> +Referenced by <a class="el" href="a06428.html#l00078">NLSOUND::CSourceCommon::getVelocity()</a>, and <a class="el" href="a06427.html#l00167">NLSOUND::CSourceCommon::setVelocity()</a>. </td> + </tr> +</table> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="a05474.html">background_source.h</a><li><a class="el" href="a05473.html">background_source.cpp</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 14:33:21 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> |