diff options
author | neodarz <neodarz@neodarz.net> | 2018-08-11 20:21:34 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2018-08-11 20:21:34 +0200 |
commit | 0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch) | |
tree | 2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /docs/doxygen/nel/a02766.html | |
download | nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip |
Initial commit
Diffstat (limited to 'docs/doxygen/nel/a02766.html')
-rw-r--r-- | docs/doxygen/nel/a02766.html | 865 |
1 files changed, 865 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a02766.html b/docs/doxygen/nel/a02766.html new file mode 100644 index 00000000..3e7d5c17 --- /dev/null +++ b/docs/doxygen/nel/a02766.html @@ -0,0 +1,865 @@ +<!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::CListenerAL 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::CListenerAL Class Reference</h1><code>#include <<a class="el" href="a05918.html">listener_al.h</a>></code> +<p> +<p>Inheritance diagram for NLSOUND::CListenerAL: +<p><center><img src="a02766.png" usemap="#NLSOUND::CListenerAL_map" border="0" alt=""></center> +<map name="NLSOUND::CListenerAL_map"> +<area href="a03861.html" alt="NLSOUND::IListener" shape="rect" coords="0,0,148,24"> +</map> +<hr><a name="_details"></a><h2>Detailed Description</h2> +OpenAL sound listener.<p> +For arguments as 3D vectors, use the NeL vector coordinate system (not OpenAL/OpenGL's one).<p> +<dl compact><dt><b>Author:</b></dt><dd>Olivier Cado <p> +Nevrax France </dd></dl> +<dl compact><dt><b>Date:</b></dt><dd>2001 </dd></dl> + +<p> + +<p> +Definition at line <a class="el" href="a05918.html#l00046">46</a> of file <a class="el" href="a05918.html">listener_al.h</a>.<table border=0 cellpadding=0 cellspacing=0> +<tr><td></td></tr> +<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a02766.html#NLSOUND_1_1CListenerALa0">CListenerAL</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#NLSOUND_1_1CListenerALa0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual </td><td class="memItemRight" valign=bottom><a class="el" href="a02766.html#NLSOUND_1_1CListenerALa1">~CListenerAL</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#NLSOUND_1_1CListenerALa1"></a><br><br></td></tr> +<tr><td colspan="2"><div class="groupHeader">Listener properties</div></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual float </td><td class="memItemRight" valign=bottom><a class="el" href="a02766.html#NLSOUND_1_1CListenerALz1320_0">getGain</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the gain. <a href="#NLSOUND_1_1CListenerALz1320_0"></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="a02766.html#NLSOUND_1_1CListenerALz1320_1">getOrientation</a> (<a class="el" href="a03128.html">NLMISC::CVector</a> &front, <a class="el" href="a03128.html">NLMISC::CVector</a> &up) const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the orientation vectors. <a href="#NLSOUND_1_1CListenerALz1320_1"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual const <a class="el" href="a03128.html">NLMISC::CVector</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="a02766.html#NLSOUND_1_1CListenerALz1320_2">getPos</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="a02766.html#NLSOUND_1_1CListenerALz1320_3">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_1CListenerALz1320_3"></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="a02766.html#NLSOUND_1_1CListenerALz1320_4">setGain</a> (float gain)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a02766.html#NLSOUND_1_1CListenerALz1320_5">setOrientation</a> (const <a class="el" href="a03128.html">NLMISC::CVector</a> &front, const <a class="el" href="a03128.html">NLMISC::CVector</a> &up)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the orientation vectors (3D mode only) (default: (0,1,0), (0,0,1)). <a href="#NLSOUND_1_1CListenerALz1320_5"></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="a02766.html#NLSOUND_1_1CListenerALz1320_6">setPos</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 (default: (0,0,0)) (3D mode only). <a href="#NLSOUND_1_1CListenerALz1320_6"></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="a02766.html#NLSOUND_1_1CListenerALz1320_7">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) (default: (0,0,0)). <a href="#NLSOUND_1_1CListenerALz1320_7"></a><br><br></td></tr> +<tr><td colspan="2"><div class="groupHeader">Global properties</div></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a02766.html#NLSOUND_1_1CListenerALz1322_0">setDopplerFactor</a> (float f)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the doppler factor (default: 1) to exaggerate or not the doppler effect. <a href="#NLSOUND_1_1CListenerALz1322_0"></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="a02766.html#NLSOUND_1_1CListenerALz1322_1">setEAXProperty</a> (<a class="el" href="a04558.html#a15">uint</a> prop, void *<a class="el" href="a04223.html#a658">value</a>, <a class="el" href="a04558.html#a15">uint</a> valuesize)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Set any EAX listener property if EAX available. <a href="#NLSOUND_1_1CListenerALz1322_1"></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="a02766.html#NLSOUND_1_1CListenerALz1322_2">setEnvironment</a> (<a class="el" href="a04558.html#a15">uint</a> env, float <a class="el" href="a04223.html#a587">size</a>=7.5f)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Set DSPROPERTY_EAXLISTENER_ENVIRONMENT and DSPROPERTY_EAXLISTENER_ENVIRONMENTSIZE if EAX available (see EAX listener properties). <a href="#NLSOUND_1_1CListenerALz1322_2"></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="a02766.html#NLSOUND_1_1CListenerALz1322_3">setRolloffFactor</a> (float f)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the rolloff factor (default: 1) to scale the distance attenuation effect. <a href="#NLSOUND_1_1CListenerALz1322_3"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02766.html">CListenerAL</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a02766.html#NLSOUND_1_1CListenerALe0">instance</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the instance of the singleton. <a href="#NLSOUND_1_1CListenerALe0"></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="a03128.html">NLMISC::CVector</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02766.html#NLSOUND_1_1CListenerALr0">_Pos</a></td></tr> + +<tr><td colspan=2><br><h2>Static Private Attributes</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02766.html">CListenerAL</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a02766.html#NLSOUND_1_1CListenerALv0">_Instance</a> = NULL</td></tr> + +</table> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="NLSOUND_1_1CListenerALa0" doxytag="NLSOUND::CListenerAL::CListenerAL" ></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::CListenerAL::CListenerAL </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Constructor. +<p> + +<p> +Definition at line <a class="el" href="a05917.html#l00045">45</a> of file <a class="el" href="a05917.html">listener_al.cpp</a>. +<p> +References <a class="el" href="a05622.html#l00154">nlerror</a>. +<p> +<div class="fragment"><pre>00045 : <a class="code" href="a03861.html#NLSOUND_1_1IListenerb0">IListener</a>() +00046 { +00047 <span class="keywordflow">if</span> ( <a class="code" href="a02766.html#NLSOUND_1_1CListenerALv0">_Instance</a> == NULL ) +00048 { +00049 <a class="code" href="a02766.html#NLSOUND_1_1CListenerALv0">_Instance</a> = <span class="keyword">this</span>; +00050 } +00051 <span class="keywordflow">else</span> +00052 { +00053 <a class="code" href="a04199.html#a3">nlerror</a>( <span class="stringliteral">"Listener singleton instanciated twice"</span> ); +00054 } +00055 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CListenerALa1" doxytag="NLSOUND::CListenerAL::~CListenerAL" ></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 NLSOUND::CListenerAL::~<a class="el" href="a02766.html">CListenerAL</a> </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Destructor. +<p> + +<p> +Definition at line <a class="el" href="a05918.html#l00096">96</a> of file <a class="el" href="a05918.html">listener_al.h</a>. +<p> +<div class="fragment"><pre>00096 { <a class="code" href="a02766.html#NLSOUND_1_1CListenerALv0">_Instance</a> = NULL; } +</pre></div> </td> + </tr> +</table> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="NLSOUND_1_1CListenerALz1320_0" doxytag="NLSOUND::CListenerAL::getGain" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> float NLSOUND::CListenerAL::getGain </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]</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="a03861.html#NLSOUND_1_1IListenerz1316_0">NLSOUND::IListener</a>. +<p> +Definition at line <a class="el" href="a05917.html#l00177">177</a> of file <a class="el" href="a05917.html">listener_al.cpp</a>. +<p> +References <a class="el" href="a06419.html#l00074">TestALError</a>. +<p> +<div class="fragment"><pre>00178 { +00179 ALfloat gain; +00180 <span class="preprocessor">#ifdef NL_OS_WINDOWS</span> +00181 <span class="preprocessor"></span> alGetListenerf( AL_GAIN, &gain ); +00182 <span class="preprocessor">#else</span> +00183 <span class="preprocessor"></span> alGetListenerfv( AL_GAIN, &gain ); +00184 <span class="preprocessor">#endif</span> +00185 <span class="preprocessor"></span> <a class="code" href="a04996.html#a0">TestALError</a>(); +00186 <span class="keywordflow">return</span> gain; +00187 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CListenerALz1320_1" doxytag="NLSOUND::CListenerAL::getOrientation" ></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::CListenerAL::getOrientation </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="mdname" nowrap> <em>front</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a03128.html">NLMISC::CVector</a> & </td> + <td class="mdname" nowrap> <em>up</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"> const<code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get the orientation vectors. +<p> + +<p> +Implements <a class="el" href="a03861.html#NLSOUND_1_1IListenerz1316_1">NLSOUND::IListener</a>. +<p> +Definition at line <a class="el" href="a05917.html#l00149">149</a> of file <a class="el" href="a05917.html">listener_al.cpp</a>. +<p> +References <a class="el" href="a06682.html#l00136">NLMISC::CVector::set()</a>, <a class="el" href="a06419.html#l00074">TestALError</a>, and <a class="el" href="a05646.html#l00237">v</a>. +<p> +<div class="fragment"><pre>00150 { +00151 <span class="comment">// Forward then up</span> +00152 ALfloat <a class="code" href="a04223.html#a576">v</a>[6]; +00153 alGetListenerfv( AL_ORIENTATION, v ); +00154 <a class="code" href="a04996.html#a0">TestALError</a>(); +00155 <span class="comment">// Coordsys conversion</span> +00156 front.<a class="code" href="a03128.html#NLMISC_1_1CVectorz2051_8">set</a>( v[0], -v[2], v[1] ); +00157 up.<a class="code" href="a03128.html#NLMISC_1_1CVectorz2051_8">set</a>( v[3], -v[5], v[4] ); +00158 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CListenerALz1320_2" doxytag="NLSOUND::CListenerAL::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::CListenerAL::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]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get the position vector. See <a class="el" href="a02766.html#NLSOUND_1_1CListenerALz1320_6">setPos()</a> for details. +<p> +Implements <a class="el" href="a03861.html#NLSOUND_1_1IListenerz1316_2">NLSOUND::IListener</a>. +<p> +Definition at line <a class="el" href="a05917.html#l00073">73</a> of file <a class="el" href="a05917.html">listener_al.cpp</a>. +<p> +<div class="fragment"><pre>00074 { +00075 <span class="keywordflow">return</span> <a class="code" href="a02766.html#NLSOUND_1_1CListenerALr0">_Pos</a>; +00076 +00077 <span class="comment">// Currently, the OpenAL headers are different between Windows and Linux versions !</span> +00078 <span class="comment">// alGetListener3f() is part of the spec, though.</span> +00079 <span class="comment">/*</span> +00080 <span class="comment">#ifdef NL_OS_WINDOWS</span> +00081 <span class="comment"> // Coordsys conversion</span> +00082 <span class="comment"> float glposz;</span> +00083 <span class="comment"> alGetListener3f( AL_POSITION, &pos.x, &pos.z, &glposz );</span> +00084 <span class="comment"> pos.y = -glposz;</span> +00085 <span class="comment">#else</span> +00086 <span class="comment"> float posarray [3];</span> +00087 <span class="comment"> alGetListenerfv( AL_POSITION, posarray );</span> +00088 <span class="comment"> // Coordsys conversion</span> +00089 <span class="comment"> pos.set( posarray[0], -posarray[2], posarray[1] );</span> +00090 <span class="comment">#endif</span> +00091 <span class="comment"> TestALError();</span> +00092 <span class="comment">*/</span> +00093 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CListenerALz1320_3" doxytag="NLSOUND::CListenerAL::getVelocity" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLSOUND::CListenerAL::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> [virtual]</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="a03861.html#NLSOUND_1_1IListenerz1316_3">NLSOUND::IListener</a>. +<p> +Definition at line <a class="el" href="a05917.html#l00110">110</a> of file <a class="el" href="a05917.html">listener_al.cpp</a>. +<p> +References <a class="el" href="a06682.html#l00136">NLMISC::CVector::set()</a>, <a class="el" href="a06419.html#l00074">TestALError</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>. +<p> +<div class="fragment"><pre>00111 { +00112 <span class="preprocessor">#ifdef NL_OS_WINDOWS</span> +00113 <span class="preprocessor"></span> <span class="comment">// Coordsys conversion</span> +00114 <span class="keywordtype">float</span> glposz; +00115 alGetListener3f( AL_VELOCITY, &vel.<a class="code" href="a03128.html#NLMISC_1_1CVectoro0">x</a>, &vel.<a class="code" href="a03128.html#NLMISC_1_1CVectoro2">z</a>, &glposz ); +00116 vel.<a class="code" href="a03128.html#NLMISC_1_1CVectoro1">y</a> = - glposz; +00117 <span class="preprocessor">#else</span> +00118 <span class="preprocessor"></span> <span class="keywordtype">float</span> velarray [3]; +00119 alGetListenerfv( AL_VELOCITY, velarray ); +00120 <span class="comment">// Coordsys conversion</span> +00121 vel.<a class="code" href="a03128.html#NLMISC_1_1CVectorz2051_8">set</a>( velarray[0], -velarray[2], velarray[1] ); +00122 <span class="preprocessor">#endif</span> +00123 <span class="preprocessor"></span> <a class="code" href="a04996.html#a0">TestALError</a>(); +00124 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CListenerALe0" doxytag="NLSOUND::CListenerAL::instance" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a02766.html">CListenerAL</a>* NLSOUND::CListenerAL::instance </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, static]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the instance of the singleton. +<p> + +<p> +Definition at line <a class="el" href="a05918.html#l00054">54</a> of file <a class="el" href="a05918.html">listener_al.h</a>. +<p> +<div class="fragment"><pre>00054 { <span class="keywordflow">return</span> <a class="code" href="a02766.html#NLSOUND_1_1CListenerALv0">_Instance</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CListenerALz1322_0" doxytag="NLSOUND::CListenerAL::setDopplerFactor" ></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::CListenerAL::setDopplerFactor </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">float </td> + <td class="mdname1" valign="top" nowrap> <em>f</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Set the doppler factor (default: 1) to exaggerate or not the doppler effect. +<p> + +<p> +Implements <a class="el" href="a03861.html#NLSOUND_1_1IListenerz1318_0">NLSOUND::IListener</a>. +<p> +Definition at line <a class="el" href="a05917.html#l00193">193</a> of file <a class="el" href="a05917.html">listener_al.cpp</a>. +<p> +References <a class="el" href="a06419.html#l00074">TestALError</a>. +<p> +<div class="fragment"><pre>00194 { +00195 alDopplerFactor( f ); +00196 <a class="code" href="a04996.html#a0">TestALError</a>(); +00197 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CListenerALz1322_1" doxytag="NLSOUND::CListenerAL::setEAXProperty" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLSOUND::CListenerAL::setEAXProperty </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>prop</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>void * </td> + <td class="mdname" nowrap> <em>value</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>valuesize</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Set any EAX listener property if EAX available. +<p> + +<p> +Implements <a class="el" href="a03861.html#NLSOUND_1_1IListenerz1318_1">NLSOUND::IListener</a>. +<p> +Definition at line <a class="el" href="a05917.html#l00228">228</a> of file <a class="el" href="a05917.html">listener_al.cpp</a>. +<p> +References <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05646.html#l01132">value</a>. +<p> +<div class="fragment"><pre>00229 { +00230 <span class="preprocessor">#if EAX_AVAILABLE == 1</span> +00231 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( EAXSetProp != NULL ) +00232 { +00233 EAXSetProp( &DSPROPSETID_EAX_ListenerProperties, prop, 0, value, valuesize ); +00234 } +00235 <span class="preprocessor">#endif</span> +00236 <span class="preprocessor"></span>} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CListenerALz1322_2" doxytag="NLSOUND::CListenerAL::setEnvironment" ></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::CListenerAL::setEnvironment </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>env</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>float </td> + <td class="mdname" nowrap> <em>size</em> = 7.5f</td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Set DSPROPERTY_EAXLISTENER_ENVIRONMENT and DSPROPERTY_EAXLISTENER_ENVIRONMENTSIZE if EAX available (see EAX listener properties). +<p> + +<p> +Implements <a class="el" href="a03861.html#NLSOUND_1_1IListenerz1318_2">NLSOUND::IListener</a>. +<p> +Definition at line <a class="el" href="a05917.html#l00213">213</a> of file <a class="el" href="a05917.html">listener_al.cpp</a>. +<p> +References <a class="el" href="a05646.html#l00645">size</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>00214 { +00215 <span class="preprocessor">#if EAX_AVAILABLE == 1</span> +00216 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( EAXSetProp != NULL ) +00217 { +00218 EAXSetProp( &DSPROPSETID_EAX_ListenerProperties, DSPROPERTY_EAXLISTENER_ENVIRONMENT, 0, &env, <span class="keyword">sizeof</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>) ); +00219 EAXSetProp( &DSPROPSETID_EAX_ListenerProperties, DSPROPERTY_EAXLISTENER_ENVIRONMENTSIZE, 0, &size, <span class="keyword">sizeof</span>(<span class="keywordtype">float</span>) ); +00220 } +00221 <span class="preprocessor">#endif</span> +00222 <span class="preprocessor"></span>} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CListenerALz1320_4" doxytag="NLSOUND::CListenerAL::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::CListenerAL::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> +Implements <a class="el" href="a03861.html#NLSOUND_1_1IListenerz1316_4">NLSOUND::IListener</a>. +<p> +Definition at line <a class="el" href="a05917.html#l00167">167</a> of file <a class="el" href="a05917.html">listener_al.cpp</a>. +<p> +References <a class="el" href="a06419.html#l00074">TestALError</a>. +<p> +<div class="fragment"><pre>00168 { +00169 alListenerf( AL_GAIN, gain ); +00170 <a class="code" href="a04996.html#a0">TestALError</a>(); +00171 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CListenerALz1320_5" doxytag="NLSOUND::CListenerAL::setOrientation" ></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::CListenerAL::setOrientation </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="mdname" nowrap> <em>front</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03128.html">NLMISC::CVector</a> & </td> + <td class="mdname" nowrap> <em>up</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Set the orientation vectors (3D mode only) (default: (0,1,0), (0,0,1)). +<p> + +<p> +Implements <a class="el" href="a03861.html#NLSOUND_1_1IListenerz1316_5">NLSOUND::IListener</a>. +<p> +Definition at line <a class="el" href="a05917.html#l00130">130</a> of file <a class="el" href="a05917.html">listener_al.cpp</a>. +<p> +References <a class="el" href="a06419.html#l00074">TestALError</a>, <a class="el" href="a05646.html#l00237">v</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>. +<p> +<div class="fragment"><pre>00131 { +00132 <span class="comment">// Forward then up</span> +00133 ALfloat <a class="code" href="a04223.html#a576">v</a>[6]; +00134 <span class="comment">// Coordsys conversion</span> +00135 <a class="code" href="a04223.html#a576">v</a>[0] = front.<a class="code" href="a03128.html#NLMISC_1_1CVectoro0">x</a>; +00136 <a class="code" href="a04223.html#a576">v</a>[1] = front.<a class="code" href="a03128.html#NLMISC_1_1CVectoro2">z</a>; +00137 <a class="code" href="a04223.html#a576">v</a>[2] = -front.<a class="code" href="a03128.html#NLMISC_1_1CVectoro1">y</a>; +00138 <a class="code" href="a04223.html#a576">v</a>[3] = up.<a class="code" href="a03128.html#NLMISC_1_1CVectoro0">x</a>; +00139 <a class="code" href="a04223.html#a576">v</a>[4] = up.<a class="code" href="a03128.html#NLMISC_1_1CVectoro2">z</a>; +00140 <a class="code" href="a04223.html#a576">v</a>[5] = -up.<a class="code" href="a03128.html#NLMISC_1_1CVectoro1">y</a>; +00141 alListenerfv( AL_ORIENTATION, v ); +00142 <a class="code" href="a04996.html#a0">TestALError</a>(); +00143 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CListenerALz1320_6" doxytag="NLSOUND::CListenerAL::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::CListenerAL::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 only). +<p> + +<p> +Implements <a class="el" href="a03861.html#NLSOUND_1_1IListenerz1316_6">NLSOUND::IListener</a>. +<p> +Definition at line <a class="el" href="a05917.html#l00061">61</a> of file <a class="el" href="a05917.html">listener_al.cpp</a>. +<p> +References <a class="el" href="a06419.html#l00074">TestALError</a>. +<p> +<div class="fragment"><pre>00062 { +00063 <a class="code" href="a02766.html#NLSOUND_1_1CListenerALr0">_Pos</a> = pos; +00064 <span class="comment">// Coordinate system: conversion from NeL to OpenAL/GL:</span> +00065 alListener3f( AL_POSITION, pos.x, pos.z, -pos.y ); +00066 <a class="code" href="a04996.html#a0">TestALError</a>(); +00067 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CListenerALz1322_3" doxytag="NLSOUND::CListenerAL::setRolloffFactor" ></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::CListenerAL::setRolloffFactor </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">float </td> + <td class="mdname1" valign="top" nowrap> <em>f</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Set the rolloff factor (default: 1) to scale the distance attenuation effect. +<p> + +<p> +Implements <a class="el" href="a03861.html#NLSOUND_1_1IListenerz1318_3">NLSOUND::IListener</a>. +<p> +Definition at line <a class="el" href="a05917.html#l00203">203</a> of file <a class="el" href="a05917.html">listener_al.cpp</a>. +<p> +References <a class="el" href="a05622.html#l00290">nlassert</a>. +<p> +<div class="fragment"><pre>00204 { +00205 <a class="code" href="a04199.html#a6">nlassert</a>( CSoundDriverAL::instance() != NULL ); +00206 CSoundDriverAL::instance()->applyRolloffFactor( f ); +00207 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CListenerALz1320_7" doxytag="NLSOUND::CListenerAL::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::CListenerAL::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) (default: (0,0,0)). +<p> + +<p> +Implements <a class="el" href="a03861.html#NLSOUND_1_1IListenerz1316_7">NLSOUND::IListener</a>. +<p> +Definition at line <a class="el" href="a05917.html#l00099">99</a> of file <a class="el" href="a05917.html">listener_al.cpp</a>. +<p> +References <a class="el" href="a06419.html#l00074">TestALError</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>. +<p> +<div class="fragment"><pre>00100 { +00101 <span class="comment">// Coordsys conversion</span> +00102 alListener3f( AL_VELOCITY, vel.<a class="code" href="a03128.html#NLMISC_1_1CVectoro0">x</a>, vel.<a class="code" href="a03128.html#NLMISC_1_1CVectoro2">z</a>, -vel.<a class="code" href="a03128.html#NLMISC_1_1CVectoro1">y</a> ); +00103 <a class="code" href="a04996.html#a0">TestALError</a>(); +00104 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Field Documentation</h2> +<a class="anchor" name="NLSOUND_1_1CListenerALv0" doxytag="NLSOUND::CListenerAL::_Instance" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a02766.html">CListenerAL</a> * <a class="el" href="a02766.html#NLSOUND_1_1CListenerALv0">NLSOUND::CListenerAL::_Instance</a> = NULL<code> [static, private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05917.html#l00039">39</a> of file <a class="el" href="a05917.html">listener_al.cpp</a>. </td> + </tr> +</table> +<a class="anchor" name="NLSOUND_1_1CListenerALr0" doxytag="NLSOUND::CListenerAL::_Pos" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03128.html">NLMISC::CVector</a> <a class="el" href="a02766.html#NLSOUND_1_1CListenerALr0">NLSOUND::CListenerAL::_Pos</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05918.html#l00103">103</a> of file <a class="el" href="a05918.html">listener_al.h</a>. </td> + </tr> +</table> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="a05918.html">listener_al.h</a><li><a class="el" href="a05917.html">listener_al.cpp</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 14:39:01 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> |