diff options
Diffstat (limited to 'doc/html/classsf_1_1Sound.htm')
-rwxr-xr-x | doc/html/classsf_1_1Sound.htm | 630 |
1 files changed, 377 insertions, 253 deletions
diff --git a/doc/html/classsf_1_1Sound.htm b/doc/html/classsf_1_1Sound.htm index c7d1c44..fa5432c 100755 --- a/doc/html/classsf_1_1Sound.htm +++ b/doc/html/classsf_1_1Sound.htm @@ -10,37 +10,46 @@ <div id="logo"> <img src="./logo.jpg" width="770" height="200" title="SFML home" alt="SFML logo" /> </div> -<!-- Generated by Doxygen 1.5.2 --> -<div class="tabs"> - <ul> - <li><a href="index.htm"><span>Main Page</span></a></li> - <li><a href="namespaces.htm"><span>Namespaces</span></a></li> - <li class="current"><a href="classes.htm"><span>Classes</span></a></li> - <li><a href="files.htm"><span>Files</span></a></li> - </ul> -</div> -<div class="tabs"> - <ul> - <li><a href="classes.htm"><span>Alphabetical List</span></a></li> - <li><a href="annotated.htm"><span>Class List</span></a></li> - <li><a href="hierarchy.htm"><span>Class Hierarchy</span></a></li> - <li><a href="functions.htm"><span>Class Members</span></a></li> - </ul> -</div> -<div class="nav"> -<a class="el" href="namespacesf.htm">sf</a>::<a class="el" href="classsf_1_1Sound.htm">Sound</a></div> +<!-- Generated by Doxygen 1.5.8 --> +<div class="navigation" id="top"> + <div class="tabs"> + <ul> + <li><a href="index.htm"><span>Main Page</span></a></li> + <li><a href="namespaces.htm"><span>Namespaces</span></a></li> + <li class="current"><a href="annotated.htm"><span>Classes</span></a></li> + <li><a href="files.htm"><span>Files</span></a></li> + </ul> + </div> + <div class="tabs"> + <ul> + <li><a href="annotated.htm"><span>Class List</span></a></li> + <li><a href="classes.htm"><span>Class Index</span></a></li> + <li><a href="hierarchy.htm"><span>Class Hierarchy</span></a></li> + <li><a href="functions.htm"><span>Class Members</span></a></li> + </ul> + </div> + <div class="navpath"><b>sf</b>::<a class="el" href="classsf_1_1Sound.htm">Sound</a> + </div> +</div> +<div class="contents"> <h1>sf::Sound Class Reference</h1><!-- doxytag: class="sf::Sound" --><!-- doxytag: inherits="sf::AudioResource" --><a class="el" href="classsf_1_1Sound.htm" title="Sound defines the properties of a sound such as position, volume, pitch, etc.">Sound</a> defines the properties of a sound such as position, volume, pitch, etc. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="Sound_8hpp-source.htm">Sound.hpp</a>></code> <p> -<p>Inheritance diagram for sf::Sound: +<div class="dynheader"> +Inheritance diagram for sf::Sound:</div> +<div class="dynsection"> + <p><center><img src="classsf_1_1Sound.png" usemap="#sf::Sound_map" border="0" alt=""></center> <map name="sf::Sound_map"> <area href="classsf_1_1AudioResource.htm" alt="sf::AudioResource" shape="rect" coords="0,0,115,24"> <area href="classsf_1_1SoundStream.htm" alt="sf::SoundStream" shape="rect" coords="0,112,115,136"> <area href="classsf_1_1Music.htm" alt="sf::Music" shape="rect" coords="0,168,115,192"> </map> +</div> + +<p> <a href="classsf_1_1Sound-members.htm">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Types</h2></td></tr> @@ -94,6 +103,9 @@ <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#0d8c6f11281a574b781c53d62a4af776">SetPosition</a> (const <a class="el" href="classsf_1_1Vector3.htm">Vector3f</a> &Position)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the sound position (take a 3D vector). <a href="#0d8c6f11281a574b781c53d62a4af776"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#7604f576d184ba8031789beee96d04d3">SetRelativeToListener</a> (bool Relative)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Make the sound's position relative to the listener's position, or absolute. <a href="#7604f576d184ba8031789beee96d04d3"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#0a545d8dca68d85a03390f6da7c446a9">SetMinDistance</a> (float MinDistance)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the minimum distance - closer than this distance, the listener will hear the sound at its maximum volume. <a href="#0a545d8dca68d85a03390f6da7c446a9"></a><br></td></tr> @@ -103,47 +115,48 @@ <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#e779b4fa3d8d98a1490334dbd32e8d62">SetPlayingOffset</a> (float TimeOffset)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the current playing position of the sound. <a href="#e779b4fa3d8d98a1490334dbd32e8d62"></a><br></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classsf_1_1SoundBuffer.htm">SoundBuffer</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#b6d46013fb3f1c23b79fed42024447f8">GetBuffer</a> () const</td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classsf_1_1SoundBuffer.htm">SoundBuffer</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#bb46557ecfb32c4538fedad28cc59d9e">GetBuffer</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the source buffer. <a href="#bb46557ecfb32c4538fedad28cc59d9e"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#5cdc44ade7bda8db2d0431701d72495e">GetLoop</a> () const </td></tr> -<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the source buffer. <a href="#b6d46013fb3f1c23b79fed42024447f8"></a><br></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#225e8dab6b148652304ed1874b6b19a3">GetLoop</a> () const</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Tell whether or not the sound is looping. <a href="#5cdc44ade7bda8db2d0431701d72495e"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#42333202ed0586f434d852cc35b9d4ef">GetPitch</a> () const </td></tr> -<tr><td class="mdescLeft"> </td><td class="mdescRight">Tell whether or not the sound is looping. <a href="#225e8dab6b148652304ed1874b6b19a3"></a><br></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#b591af704d910f620343685ce3916c80">GetPitch</a> () const</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the pitch. <a href="#42333202ed0586f434d852cc35b9d4ef"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#018e78cd6c50d653fffff1005a350782">GetVolume</a> () const </td></tr> -<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the pitch. <a href="#b591af704d910f620343685ce3916c80"></a><br></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#6990c8406bdb13d82d13d662a1b7423e">GetVolume</a> () const</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the volume. <a href="#018e78cd6c50d653fffff1005a350782"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classsf_1_1Vector3.htm">Vector3f</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#b1adb173ee12a86f261fb765be050643">GetPosition</a> () const </td></tr> -<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the volume. <a href="#6990c8406bdb13d82d13d662a1b7423e"></a><br></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classsf_1_1Vector3.htm">Vector3f</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#9462818ee2ff3318648c416dd6430823">GetPosition</a> () const</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the sound position. <a href="#b1adb173ee12a86f261fb765be050643"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#f0278152abf6e3f195353ce3c270f34e">IsRelativeToListener</a> () const </td></tr> -<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the sound position. <a href="#9462818ee2ff3318648c416dd6430823"></a><br></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#e4c1cc0b8ff482bf1b834ac4b7b1afd7">GetMinDistance</a> () const</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Tell if the sound's position is relative to the listener's position, or if it's absolute. <a href="#f0278152abf6e3f195353ce3c270f34e"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#07f37119f7b3b00f274ac0263a4bc58b">GetMinDistance</a> () const </td></tr> -<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the minimum distance. <a href="#e4c1cc0b8ff482bf1b834ac4b7b1afd7"></a><br></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#7162ae32e4d530a4c5f93a1297c91440">GetAttenuation</a> () const</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the minimum distance. <a href="#07f37119f7b3b00f274ac0263a4bc58b"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#f594211c35d6ac7a9df083c226749c42">GetAttenuation</a> () const </td></tr> -<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the attenuation factor. <a href="#7162ae32e4d530a4c5f93a1297c91440"></a><br></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classsf_1_1Sound.htm#28ad2186cde78fed2c79c867b9622195">Status</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#c2ffc93f9ffaddc50b9c9adb75581b55">GetStatus</a> () const</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the attenuation factor. <a href="#f594211c35d6ac7a9df083c226749c42"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classsf_1_1Sound.htm#28ad2186cde78fed2c79c867b9622195">Status</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#76c97fca3a5092db606eb66461f063af">GetStatus</a> () const </td></tr> -<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the status of the sound (stopped, paused, playing). <a href="#c2ffc93f9ffaddc50b9c9adb75581b55"></a><br></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#02e2b7593110f61eeb7cb58269d62bdd">GetPlayingOffset</a> () const</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the status of the sound (stopped, paused, playing). <a href="#76c97fca3a5092db606eb66461f063af"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#0e80c736a6865123be0c19e99f36467f">GetPlayingOffset</a> () const </td></tr> -<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the current playing position of the sound. <a href="#02e2b7593110f61eeb7cb58269d62bdd"></a><br></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classsf_1_1Sound.htm">Sound</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#f4115769f723a405f5561b4c68f2f45e">operator=</a> (const <a class="el" href="classsf_1_1Sound.htm">Sound</a> &Other)</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the current playing position of the sound. <a href="#0e80c736a6865123be0c19e99f36467f"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classsf_1_1Sound.htm">Sound</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#b794404f8facdad9578c31eff25110a7">operator=</a> (const <a class="el" href="classsf_1_1Sound.htm">Sound</a> &Other)</td></tr> -<tr><td class="mdescLeft"> </td><td class="mdescRight">Assignment operator. <a href="#f4115769f723a405f5561b4c68f2f45e"></a><br></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Assignment operator. <a href="#b794404f8facdad9578c31eff25110a7"></a><br></td></tr> <tr><td colspan="2"><br><h2>Friends</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="22d0a4fe764bba1f30b58224b1f8855e"></a><!-- doxytag: member="sf::Sound::SoundStream" ref="22d0a4fe764bba1f30b58224b1f8855e" args="" --> -class </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sound.htm#22d0a4fe764bba1f30b58224b1f8855e">SoundStream</a></td></tr> +class </td><td class="memItemRight" valign="bottom"><b>SoundStream</b></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> <a class="el" href="classsf_1_1Sound.htm" title="Sound defines the properties of a sound such as position, volume, pitch, etc.">Sound</a> defines the properties of a sound such as position, volume, pitch, etc. -<p> - -<p> -Definition at line <a class="el" href="Sound_8hpp-source.htm#l00045">45</a> of file <a class="el" href="Sound_8hpp-source.htm">Sound.hpp</a>.<hr><h2>Member Enumeration Documentation</h2> +<p>Definition at line <a class="el" href="Sound_8hpp-source.htm#l00045">45</a> of file <a class="el" href="Sound_8hpp-source.htm">Sound.hpp</a>.</p> +<hr><h2>Member Enumeration Documentation</h2> <a class="anchor" name="28ad2186cde78fed2c79c867b9622195"></a><!-- doxytag: member="sf::Sound::Status" ref="28ad2186cde78fed2c79c867b9622195" args="" --> <div class="memitem"> <div class="memproto"> @@ -169,8 +182,8 @@ Enumeration of the sound states. </table> </dl> -<p> -Definition at line <a class="el" href="Sound_8hpp-source.htm#l00052">52</a> of file <a class="el" href="Sound_8hpp-source.htm">Sound.hpp</a>. +<p>Definition at line <a class="el" href="Sound_8hpp-source.htm#l00052">52</a> of file <a class="el" href="Sound_8hpp-source.htm">Sound.hpp</a>.</p> + </div> </div><p> <hr><h2>Constructor & Destructor Documentation</h2> @@ -183,7 +196,7 @@ Definition at line <a class="el" href="Sound_8hpp-source.htm#l00052">52</a> of f <td>(</td> <td class="paramname"> </td> <td> ) </td> - <td width="100%"></td> + <td></td> </tr> </table> </div> @@ -193,6 +206,8 @@ Definition at line <a class="el" href="Sound_8hpp-source.htm#l00052">52</a> of f Default constructor. <p> +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00038">38</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> + </div> </div><p> <a class="anchor" name="45aff03dc5bf87647eba6bed7c1ced29"></a><!-- doxytag: member="sf::Sound::Sound" ref="45aff03dc5bf87647eba6bed7c1ced29" args="(const SoundBuffer &Buffer, bool Loop=false, float Pitch=1.f, float Volume=100.f, const Vector3f &Position=Vector3f(0, 0, 0))" --> @@ -232,7 +247,7 @@ Default constructor. <tr> <td></td> <td>)</td> - <td></td><td></td><td width="100%"></td> + <td></td><td></td><td></td> </tr> </table> </div> @@ -251,6 +266,8 @@ Construct the sound from its parameters. </table> </dl> +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00048">48</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> + </div> </div><p> <a class="anchor" name="a930dcf53775f501ce43d44bf54c0ce4"></a><!-- doxytag: member="sf::Sound::Sound" ref="a930dcf53775f501ce43d44bf54c0ce4" args="(const Sound &Copy)" --> @@ -263,7 +280,7 @@ Construct the sound from its parameters. <td class="paramtype">const <a class="el" href="classsf_1_1Sound.htm">Sound</a> & </td> <td class="paramname"> <em>Copy</em> </td> <td> ) </td> - <td width="100%"></td> + <td></td> </tr> </table> </div> @@ -278,6 +295,8 @@ Copy constructor. </table> </dl> +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00064">64</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> + </div> </div><p> <a class="anchor" name="d0792c35310eba2dffd8489c80fad076"></a><!-- doxytag: member="sf::Sound::~Sound" ref="d0792c35310eba2dffd8489c80fad076" args="()" --> @@ -289,7 +308,7 @@ Copy constructor. <td>(</td> <td class="paramname"> </td> <td> ) </td> - <td width="100%"></td> + <td></td> </tr> </table> </div> @@ -299,577 +318,682 @@ Copy constructor. Destructor. <p> +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00081">81</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> + </div> </div><p> <hr><h2>Member Function Documentation</h2> -<a class="anchor" name="fdafa7970587f04d3833b4095c2de1db"></a><!-- doxytag: member="sf::Sound::Play" ref="fdafa7970587f04d3833b4095c2de1db" args="()" --> +<a class="anchor" name="f594211c35d6ac7a9df083c226749c42"></a><!-- doxytag: member="sf::Sound::GetAttenuation" ref="f594211c35d6ac7a9df083c226749c42" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">void sf::Sound::Play </td> + <td class="memname">float sf::Sound::GetAttenuation </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> - <td width="100%"></td> + <td> const</td> </tr> </table> </div> <div class="memdoc"> <p> -Play the sound. +Get the attenuation factor. <p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>Attenuation factor of the sound </dd></dl> + +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00305">305</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> -<p> -Reimplemented in <a class="el" href="classsf_1_1SoundStream.htm#4d8437ef9a952fe3798bd239ff20d9bf">sf::SoundStream</a>. </div> </div><p> -<a class="anchor" name="6a712910ac1340f32e3ec3a04295ebd3"></a><!-- doxytag: member="sf::Sound::Pause" ref="6a712910ac1340f32e3ec3a04295ebd3" args="()" --> +<a class="anchor" name="bb46557ecfb32c4538fedad28cc59d9e"></a><!-- doxytag: member="sf::Sound::GetBuffer" ref="bb46557ecfb32c4538fedad28cc59d9e" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">void sf::Sound::Pause </td> + <td class="memname">const <a class="el" href="classsf_1_1SoundBuffer.htm">SoundBuffer</a> * sf::Sound::GetBuffer </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> - <td width="100%"></td> + <td> const</td> </tr> </table> </div> <div class="memdoc"> <p> -Pause the sound. +Get the source buffer. <p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd><a class="el" href="classsf_1_1Sound.htm" title="Sound defines the properties of a sound such as position, volume, pitch, etc.">Sound</a> buffer bound to the sound (can be NULL) </dd></dl> + +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00223">223</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> </div> </div><p> -<a class="anchor" name="b1f5f103f737c52ceb0b1a067b4d0630"></a><!-- doxytag: member="sf::Sound::Stop" ref="b1f5f103f737c52ceb0b1a067b4d0630" args="()" --> +<a class="anchor" name="5cdc44ade7bda8db2d0431701d72495e"></a><!-- doxytag: member="sf::Sound::GetLoop" ref="5cdc44ade7bda8db2d0431701d72495e" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">void sf::Sound::Stop </td> + <td class="memname">bool sf::Sound::GetLoop </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> - <td width="100%"></td> + <td> const</td> </tr> </table> </div> <div class="memdoc"> <p> -Stop the sound. +Tell whether or not the sound is looping. <p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if the sound is looping, false otherwise </dd></dl> + +<p>Reimplemented in <a class="el" href="classsf_1_1SoundStream.htm#caecb1c68af4a9d75f9e9ad2d42afa78">sf::SoundStream</a>.</p> + +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00232">232</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> -<p> -Reimplemented in <a class="el" href="classsf_1_1SoundStream.htm#53c9e9b160bcbcc89c93c1682b4525df">sf::SoundStream</a>. </div> </div><p> -<a class="anchor" name="9dbc27c54f0ee633c831a0b6e24ecc55"></a><!-- doxytag: member="sf::Sound::SetBuffer" ref="9dbc27c54f0ee633c831a0b6e24ecc55" args="(const SoundBuffer &Buffer)" --> +<a class="anchor" name="07f37119f7b3b00f274ac0263a4bc58b"></a><!-- doxytag: member="sf::Sound::GetMinDistance" ref="07f37119f7b3b00f274ac0263a4bc58b" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">void sf::Sound::SetBuffer </td> + <td class="memname">float sf::Sound::GetMinDistance </td> <td>(</td> - <td class="paramtype">const <a class="el" href="classsf_1_1SoundBuffer.htm">SoundBuffer</a> & </td> - <td class="paramname"> <em>Buffer</em> </td> + <td class="paramname"> </td> <td> ) </td> - <td width="100%"></td> + <td> const</td> </tr> </table> </div> <div class="memdoc"> <p> -Set the source buffer. +Get the minimum distance. <p> -<dl compact><dt><b>Parameters:</b></dt><dd> - <table border="0" cellspacing="2" cellpadding="0"> - <tr><td valign="top"></td><td valign="top"><em>Buffer</em> </td><td>: New sound buffer to bind to the sound </td></tr> - </table> -</dl> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>Minimum distance for the sound </dd></dl> + +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00293">293</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> </div> </div><p> -<a class="anchor" name="4eb9966b7289c69623a39cc0125012f4"></a><!-- doxytag: member="sf::Sound::SetLoop" ref="4eb9966b7289c69623a39cc0125012f4" args="(bool Loop)" --> +<a class="anchor" name="42333202ed0586f434d852cc35b9d4ef"></a><!-- doxytag: member="sf::Sound::GetPitch" ref="42333202ed0586f434d852cc35b9d4ef" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">void sf::Sound::SetLoop </td> + <td class="memname">float sf::Sound::GetPitch </td> <td>(</td> - <td class="paramtype">bool </td> - <td class="paramname"> <em>Loop</em> </td> + <td class="paramname"> </td> <td> ) </td> - <td width="100%"></td> + <td> const</td> </tr> </table> </div> <div class="memdoc"> <p> -Set the sound loop state. +Get the pitch. <p> -This parameter is disabled by default<p> -<dl compact><dt><b>Parameters:</b></dt><dd> - <table border="0" cellspacing="2" cellpadding="0"> - <tr><td valign="top"></td><td valign="top"><em>Loop</em> </td><td>: True to play in loop, false to play once </td></tr> - </table> -</dl> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>Pitch value </dd></dl> + +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00244">244</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> -<p> -Reimplemented in <a class="el" href="classsf_1_1SoundStream.htm#1072090152b10d83f43f0cd6bbd82b4e">sf::SoundStream</a>. </div> </div><p> -<a class="anchor" name="f93301feb88770789ba7cd993c9dd3a0"></a><!-- doxytag: member="sf::Sound::SetPitch" ref="f93301feb88770789ba7cd993c9dd3a0" args="(float Pitch)" --> +<a class="anchor" name="0e80c736a6865123be0c19e99f36467f"></a><!-- doxytag: member="sf::Sound::GetPlayingOffset" ref="0e80c736a6865123be0c19e99f36467f" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">void sf::Sound::SetPitch </td> + <td class="memname">float sf::Sound::GetPlayingOffset </td> <td>(</td> - <td class="paramtype">float </td> - <td class="paramname"> <em>Pitch</em> </td> + <td class="paramname"> </td> <td> ) </td> - <td width="100%"></td> + <td> const</td> </tr> </table> </div> <div class="memdoc"> <p> -Set the sound pitch. +Get the current playing position of the sound. <p> -The default pitch is 1<p> -<dl compact><dt><b>Parameters:</b></dt><dd> - <table border="0" cellspacing="2" cellpadding="0"> - <tr><td valign="top"></td><td valign="top"><em>Pitch</em> </td><td>: New pitch </td></tr> - </table> -</dl> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>Current playing position, expressed in seconds </dd></dl> + +<p>Reimplemented in <a class="el" href="classsf_1_1SoundStream.htm#d11fee9eb4baba68d6ed9f44bc6170ac">sf::SoundStream</a>.</p> + +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00317">317</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> </div> </div><p> -<a class="anchor" name="1536095045923a2332dd9eed6bf8e96a"></a><!-- doxytag: member="sf::Sound::SetVolume" ref="1536095045923a2332dd9eed6bf8e96a" args="(float Volume)" --> +<a class="anchor" name="b1adb173ee12a86f261fb765be050643"></a><!-- doxytag: member="sf::Sound::GetPosition" ref="b1adb173ee12a86f261fb765be050643" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">void sf::Sound::SetVolume </td> + <td class="memname"><a class="el" href="classsf_1_1Vector3.htm">Vector3f</a> sf::Sound::GetPosition </td> <td>(</td> - <td class="paramtype">float </td> - <td class="paramname"> <em>Volume</em> </td> + <td class="paramname"> </td> <td> ) </td> - <td width="100%"></td> + <td> const</td> </tr> </table> </div> <div class="memdoc"> <p> -Set the sound volume. +Get the sound position. <p> -The default volume is 100<p> -<dl compact><dt><b>Parameters:</b></dt><dd> - <table border="0" cellspacing="2" cellpadding="0"> - <tr><td valign="top"></td><td valign="top"><em>Volume</em> </td><td>: Volume (in range [0, 100]) </td></tr> - </table> -</dl> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>Position of the sound in the world </dd></dl> + +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00268">268</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> </div> </div><p> -<a class="anchor" name="b445e8738218525d8dd067628bc70c78"></a><!-- doxytag: member="sf::Sound::SetPosition" ref="b445e8738218525d8dd067628bc70c78" args="(float X, float Y, float Z)" --> +<a class="anchor" name="76c97fca3a5092db606eb66461f063af"></a><!-- doxytag: member="sf::Sound::GetStatus" ref="76c97fca3a5092db606eb66461f063af" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">void sf::Sound::SetPosition </td> + <td class="memname"><a class="el" href="classsf_1_1Sound.htm#28ad2186cde78fed2c79c867b9622195">Sound::Status</a> sf::Sound::GetStatus </td> <td>(</td> - <td class="paramtype">float </td> - <td class="paramname"> <em>X</em>, </td> - </tr> - <tr> - <td class="paramkey"></td> - <td></td> - <td class="paramtype">float </td> - <td class="paramname"> <em>Y</em>, </td> + <td class="paramname"> </td> + <td> ) </td> + <td> const</td> </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Get the status of the sound (stopped, paused, playing). +<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>Current status of the sound </dd></dl> + +<p>Reimplemented in <a class="el" href="classsf_1_1SoundStream.htm#cef2468ca4bc3e8ced76b11fb95c7ef2">sf::SoundStream</a>.</p> + +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00329">329</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> + +</div> +</div><p> +<a class="anchor" name="018e78cd6c50d653fffff1005a350782"></a><!-- doxytag: member="sf::Sound::GetVolume" ref="018e78cd6c50d653fffff1005a350782" args="() const " --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> <tr> - <td class="paramkey"></td> - <td></td> - <td class="paramtype">float </td> - <td class="paramname"> <em>Z</em></td><td> </td> + <td class="memname">float sf::Sound::GetVolume </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td> const</td> </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Get the volume. +<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>Volume value (in range [1, 100]) </dd></dl> + +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00256">256</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> + +</div> +</div><p> +<a class="anchor" name="f0278152abf6e3f195353ce3c270f34e"></a><!-- doxytag: member="sf::Sound::IsRelativeToListener" ref="f0278152abf6e3f195353ce3c270f34e" args="() const " --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> <tr> - <td></td> - <td>)</td> - <td></td><td></td><td width="100%"></td> + <td class="memname">bool sf::Sound::IsRelativeToListener </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td> const</td> </tr> </table> </div> <div class="memdoc"> <p> -Set the sound position (take 3 values). +Tell if the sound's position is relative to the listener's position, or if it's absolute. <p> -The default position is (0, 0, 0)<p> -<dl compact><dt><b>Parameters:</b></dt><dd> - <table border="0" cellspacing="2" cellpadding="0"> - <tr><td valign="top"></td><td valign="top"><em>X,Y,Z</em> </td><td>: Position of the sound in the world </td></tr> - </table> -</dl> +Tell if the sound's position is relative to the listener's position, or if it's absolute.<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if the position is relative, false if it's absolute </dd></dl> + +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00281">281</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> </div> </div><p> -<a class="anchor" name="0d8c6f11281a574b781c53d62a4af776"></a><!-- doxytag: member="sf::Sound::SetPosition" ref="0d8c6f11281a574b781c53d62a4af776" args="(const Vector3f &Position)" --> +<a class="anchor" name="b794404f8facdad9578c31eff25110a7"></a><!-- doxytag: member="sf::Sound::operator=" ref="b794404f8facdad9578c31eff25110a7" args="(const Sound &Other)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">void sf::Sound::SetPosition </td> + <td class="memname"><a class="el" href="classsf_1_1Sound.htm">Sound</a> & sf::Sound::operator= </td> <td>(</td> - <td class="paramtype">const <a class="el" href="classsf_1_1Vector3.htm">Vector3f</a> & </td> - <td class="paramname"> <em>Position</em> </td> + <td class="paramtype">const <a class="el" href="classsf_1_1Sound.htm">Sound</a> & </td> + <td class="paramname"> <em>Other</em> </td> <td> ) </td> - <td width="100%"></td> + <td></td> </tr> </table> </div> <div class="memdoc"> <p> -Set the sound position (take a 3D vector). +Assignment operator. <p> -The default position is (0, 0, 0)<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> - <tr><td valign="top"></td><td valign="top"><em>Position</em> </td><td>: Position of the sound in the world </td></tr> + <tr><td valign="top"></td><td valign="top"><em>Other</em> </td><td>: Instance to assign</td></tr> </table> </dl> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>Reference to the sound </dd></dl> + +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00349">349</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> </div> </div><p> -<a class="anchor" name="0a545d8dca68d85a03390f6da7c446a9"></a><!-- doxytag: member="sf::Sound::SetMinDistance" ref="0a545d8dca68d85a03390f6da7c446a9" args="(float MinDistance)" --> +<a class="anchor" name="6a712910ac1340f32e3ec3a04295ebd3"></a><!-- doxytag: member="sf::Sound::Pause" ref="6a712910ac1340f32e3ec3a04295ebd3" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">void sf::Sound::SetMinDistance </td> + <td class="memname">void sf::Sound::Pause </td> <td>(</td> - <td class="paramtype">float </td> - <td class="paramname"> <em>MinDistance</em> </td> + <td class="paramname"> </td> <td> ) </td> - <td width="100%"></td> + <td></td> </tr> </table> </div> <div class="memdoc"> <p> -Set the minimum distance - closer than this distance, the listener will hear the sound at its maximum volume. +Pause the sound. <p> -The default minimum distance is 1.0<p> -<dl compact><dt><b>Parameters:</b></dt><dd> - <table border="0" cellspacing="2" cellpadding="0"> - <tr><td valign="top"></td><td valign="top"><em>MinDistance</em> </td><td>: New minimum distance for the sound </td></tr> - </table> -</dl> + +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00107">107</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> </div> </div><p> -<a class="anchor" name="c3743f1fb53bf9818fbab6e9220bd7b9"></a><!-- doxytag: member="sf::Sound::SetAttenuation" ref="c3743f1fb53bf9818fbab6e9220bd7b9" args="(float Attenuation)" --> +<a class="anchor" name="fdafa7970587f04d3833b4095c2de1db"></a><!-- doxytag: member="sf::Sound::Play" ref="fdafa7970587f04d3833b4095c2de1db" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">void sf::Sound::SetAttenuation </td> + <td class="memname">void sf::Sound::Play </td> <td>(</td> - <td class="paramtype">float </td> - <td class="paramname"> <em>Attenuation</em> </td> + <td class="paramname"> </td> <td> ) </td> - <td width="100%"></td> + <td></td> </tr> </table> </div> <div class="memdoc"> <p> -Set the attenuation factor - the higher the attenuation, the more the sound will be attenuated with distance from listener. +Play the sound. <p> -The default attenuation factor 1.0<p> -<dl compact><dt><b>Parameters:</b></dt><dd> - <table border="0" cellspacing="2" cellpadding="0"> - <tr><td valign="top"></td><td valign="top"><em>Attenuation</em> </td><td>: New attenuation factor for the sound </td></tr> - </table> -</dl> + +<p>Reimplemented in <a class="el" href="classsf_1_1SoundStream.htm#4d8437ef9a952fe3798bd239ff20d9bf">sf::SoundStream</a>.</p> + +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00098">98</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> </div> </div><p> -<a class="anchor" name="e779b4fa3d8d98a1490334dbd32e8d62"></a><!-- doxytag: member="sf::Sound::SetPlayingOffset" ref="e779b4fa3d8d98a1490334dbd32e8d62" args="(float TimeOffset)" --> +<a class="anchor" name="c3743f1fb53bf9818fbab6e9220bd7b9"></a><!-- doxytag: member="sf::Sound::SetAttenuation" ref="c3743f1fb53bf9818fbab6e9220bd7b9" args="(float Attenuation)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">void sf::Sound::SetPlayingOffset </td> + <td class="memname">void sf::Sound::SetAttenuation </td> <td>(</td> <td class="paramtype">float </td> - <td class="paramname"> <em>TimeOffset</em> </td> + <td class="paramname"> <em>Attenuation</em> </td> <td> ) </td> - <td width="100%"></td> + <td></td> </tr> </table> </div> <div class="memdoc"> <p> -Set the current playing position of the sound. +Set the attenuation factor - the higher the attenuation, the more the sound will be attenuated with distance from listener. <p> +Set the attenuation factor - the higher the attenuation, the more the sound will be attenuated with distance from listener.<p> +The default attenuation factor 1.0<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> - <tr><td valign="top"></td><td valign="top"><em>TimeOffset</em> </td><td>: New playing position, expressed in seconds </td></tr> + <tr><td valign="top"></td><td valign="top"><em>Attenuation</em> </td><td>: New attenuation factor for the sound</td></tr> </table> </dl> +The default attenuation factor 1.0 +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00205">205</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> </div> </div><p> -<a class="anchor" name="b6d46013fb3f1c23b79fed42024447f8"></a><!-- doxytag: member="sf::Sound::GetBuffer" ref="b6d46013fb3f1c23b79fed42024447f8" args="() const" --> +<a class="anchor" name="9dbc27c54f0ee633c831a0b6e24ecc55"></a><!-- doxytag: member="sf::Sound::SetBuffer" ref="9dbc27c54f0ee633c831a0b6e24ecc55" args="(const SoundBuffer &Buffer)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">const <a class="el" href="classsf_1_1SoundBuffer.htm">SoundBuffer</a>* sf::Sound::GetBuffer </td> + <td class="memname">void sf::Sound::SetBuffer </td> <td>(</td> - <td class="paramname"> </td> + <td class="paramtype">const <a class="el" href="classsf_1_1SoundBuffer.htm">SoundBuffer</a> & </td> + <td class="paramname"> <em>Buffer</em> </td> <td> ) </td> - <td width="100%"> const</td> + <td></td> </tr> </table> </div> <div class="memdoc"> <p> -Get the source buffer. +Set the source buffer. <p> -<dl class="return" compact><dt><b>Returns:</b></dt><dd><a class="el" href="classsf_1_1Sound.htm" title="Sound defines the properties of a sound such as position, volume, pitch, etc.">Sound</a> buffer bound to the sound (can be NULL) </dd></dl> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>Buffer</em> </td><td>: New sound buffer to bind to the sound </td></tr> + </table> +</dl> + +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00125">125</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> </div> </div><p> -<a class="anchor" name="225e8dab6b148652304ed1874b6b19a3"></a><!-- doxytag: member="sf::Sound::GetLoop" ref="225e8dab6b148652304ed1874b6b19a3" args="() const" --> +<a class="anchor" name="4eb9966b7289c69623a39cc0125012f4"></a><!-- doxytag: member="sf::Sound::SetLoop" ref="4eb9966b7289c69623a39cc0125012f4" args="(bool Loop)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">bool sf::Sound::GetLoop </td> + <td class="memname">void sf::Sound::SetLoop </td> <td>(</td> - <td class="paramname"> </td> + <td class="paramtype">bool </td> + <td class="paramname"> <em>Loop</em> </td> <td> ) </td> - <td width="100%"> const</td> + <td></td> </tr> </table> </div> <div class="memdoc"> <p> -Tell whether or not the sound is looping. +Set the sound loop state. <p> -<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if the sound is looping, false otherwise </dd></dl> +This parameter is disabled by default<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>Loop</em> </td><td>: True to play in loop, false to play once </td></tr> + </table> +</dl> + +<p>Reimplemented in <a class="el" href="classsf_1_1SoundStream.htm#1072090152b10d83f43f0cd6bbd82b4e">sf::SoundStream</a>.</p> + +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00135">135</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> -<p> -Reimplemented in <a class="el" href="classsf_1_1SoundStream.htm#8f5f5aaba5aebc45fc008e952c0ae530">sf::SoundStream</a>. </div> </div><p> -<a class="anchor" name="b591af704d910f620343685ce3916c80"></a><!-- doxytag: member="sf::Sound::GetPitch" ref="b591af704d910f620343685ce3916c80" args="() const" --> +<a class="anchor" name="0a545d8dca68d85a03390f6da7c446a9"></a><!-- doxytag: member="sf::Sound::SetMinDistance" ref="0a545d8dca68d85a03390f6da7c446a9" args="(float MinDistance)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">float sf::Sound::GetPitch </td> + <td class="memname">void sf::Sound::SetMinDistance </td> <td>(</td> - <td class="paramname"> </td> + <td class="paramtype">float </td> + <td class="paramname"> <em>MinDistance</em> </td> <td> ) </td> - <td width="100%"> const</td> + <td></td> </tr> </table> </div> <div class="memdoc"> <p> -Get the pitch. +Set the minimum distance - closer than this distance, the listener will hear the sound at its maximum volume. <p> -<dl class="return" compact><dt><b>Returns:</b></dt><dd>Pitch value </dd></dl> +Set the minimum distance - closer than this distance, the listener will hear the sound at its maximum volume.<p> +The default minimum distance is 1.0<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>MinDistance</em> </td><td>: New minimum distance for the sound</td></tr> + </table> +</dl> +The default minimum distance is 1.0 +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00194">194</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> </div> </div><p> -<a class="anchor" name="6990c8406bdb13d82d13d662a1b7423e"></a><!-- doxytag: member="sf::Sound::GetVolume" ref="6990c8406bdb13d82d13d662a1b7423e" args="() const" --> +<a class="anchor" name="f93301feb88770789ba7cd993c9dd3a0"></a><!-- doxytag: member="sf::Sound::SetPitch" ref="f93301feb88770789ba7cd993c9dd3a0" args="(float Pitch)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">float sf::Sound::GetVolume </td> + <td class="memname">void sf::Sound::SetPitch </td> <td>(</td> - <td class="paramname"> </td> + <td class="paramtype">float </td> + <td class="paramname"> <em>Pitch</em> </td> <td> ) </td> - <td width="100%"> const</td> + <td></td> </tr> </table> </div> <div class="memdoc"> <p> -Get the volume. +Set the sound pitch. <p> -<dl class="return" compact><dt><b>Returns:</b></dt><dd>Volume value (in range [1, 100]) </dd></dl> +The default pitch is 1<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>Pitch</em> </td><td>: New pitch </td></tr> + </table> +</dl> + +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00144">144</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> </div> </div><p> -<a class="anchor" name="9462818ee2ff3318648c416dd6430823"></a><!-- doxytag: member="sf::Sound::GetPosition" ref="9462818ee2ff3318648c416dd6430823" args="() const" --> +<a class="anchor" name="e779b4fa3d8d98a1490334dbd32e8d62"></a><!-- doxytag: member="sf::Sound::SetPlayingOffset" ref="e779b4fa3d8d98a1490334dbd32e8d62" args="(float TimeOffset)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname"><a class="el" href="classsf_1_1Vector3.htm">Vector3f</a> sf::Sound::GetPosition </td> + <td class="memname">void sf::Sound::SetPlayingOffset </td> <td>(</td> - <td class="paramname"> </td> + <td class="paramtype">float </td> + <td class="paramname"> <em>TimeOffset</em> </td> <td> ) </td> - <td width="100%"> const</td> + <td></td> </tr> </table> </div> <div class="memdoc"> <p> -Get the sound position. +Set the current playing position of the sound. <p> -<dl class="return" compact><dt><b>Returns:</b></dt><dd>Position of the sound in the world </dd></dl> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>TimeOffset</em> </td><td>: New playing position, expressed in seconds </td></tr> + </table> +</dl> + +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00214">214</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> </div> </div><p> -<a class="anchor" name="e4c1cc0b8ff482bf1b834ac4b7b1afd7"></a><!-- doxytag: member="sf::Sound::GetMinDistance" ref="e4c1cc0b8ff482bf1b834ac4b7b1afd7" args="() const" --> +<a class="anchor" name="0d8c6f11281a574b781c53d62a4af776"></a><!-- doxytag: member="sf::Sound::SetPosition" ref="0d8c6f11281a574b781c53d62a4af776" args="(const Vector3f &Position)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">float sf::Sound::GetMinDistance </td> + <td class="memname">void sf::Sound::SetPosition </td> <td>(</td> - <td class="paramname"> </td> + <td class="paramtype">const <a class="el" href="classsf_1_1Vector3.htm">Vector3f</a> & </td> + <td class="paramname"> <em>Position</em> </td> <td> ) </td> - <td width="100%"> const</td> + <td></td> </tr> </table> </div> <div class="memdoc"> <p> -Get the minimum distance. +Set the sound position (take a 3D vector). <p> -<dl class="return" compact><dt><b>Returns:</b></dt><dd>Minimum distance for the sound </dd></dl> +The default position is (0, 0, 0)<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>Position</em> </td><td>: Position of the sound in the world</td></tr> + </table> +</dl> +The default position is (0, 0, 0) +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00172">172</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> </div> </div><p> -<a class="anchor" name="7162ae32e4d530a4c5f93a1297c91440"></a><!-- doxytag: member="sf::Sound::GetAttenuation" ref="7162ae32e4d530a4c5f93a1297c91440" args="() const" --> +<a class="anchor" name="b445e8738218525d8dd067628bc70c78"></a><!-- doxytag: member="sf::Sound::SetPosition" ref="b445e8738218525d8dd067628bc70c78" args="(float X, float Y, float Z)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">float sf::Sound::GetAttenuation </td> + <td class="memname">void sf::Sound::SetPosition </td> <td>(</td> - <td class="paramname"> </td> - <td> ) </td> - <td width="100%"> const</td> + <td class="paramtype">float </td> + <td class="paramname"> <em>X</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">float </td> + <td class="paramname"> <em>Y</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">float </td> + <td class="paramname"> <em>Z</em></td><td> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> -Get the attenuation factor. +Set the sound position (take 3 values). <p> -<dl class="return" compact><dt><b>Returns:</b></dt><dd>Attenuation factor of the sound </dd></dl> +The default position is (0, 0, 0)<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>X,Y,Z</em> </td><td>: Position of the sound in the world</td></tr> + </table> +</dl> +The default position is (0, 0, 0) +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00162">162</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> </div> </div><p> -<a class="anchor" name="c2ffc93f9ffaddc50b9c9adb75581b55"></a><!-- doxytag: member="sf::Sound::GetStatus" ref="c2ffc93f9ffaddc50b9c9adb75581b55" args="() const" --> +<a class="anchor" name="7604f576d184ba8031789beee96d04d3"></a><!-- doxytag: member="sf::Sound::SetRelativeToListener" ref="7604f576d184ba8031789beee96d04d3" args="(bool Relative)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname"><a class="el" href="classsf_1_1Sound.htm#28ad2186cde78fed2c79c867b9622195">Status</a> sf::Sound::GetStatus </td> + <td class="memname">void sf::Sound::SetRelativeToListener </td> <td>(</td> - <td class="paramname"> </td> + <td class="paramtype">bool </td> + <td class="paramname"> <em>Relative</em> </td> <td> ) </td> - <td width="100%"> const</td> + <td></td> </tr> </table> </div> <div class="memdoc"> <p> -Get the status of the sound (stopped, paused, playing). +Make the sound's position relative to the listener's position, or absolute. <p> -<dl class="return" compact><dt><b>Returns:</b></dt><dd>Current status of the sound </dd></dl> +Make the sound's position relative to the listener's position, or absolute.<p> +The default value is false (absolute)<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>Relative</em> </td><td>: True to set the position relative, false to set it absolute</td></tr> + </table> +</dl> +The default value is false (absolute) +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00183">183</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> -<p> -Reimplemented in <a class="el" href="classsf_1_1SoundStream.htm#308ef2a984db4cfd0b8e1bf8b1e8e4c0">sf::SoundStream</a>. </div> </div><p> -<a class="anchor" name="02e2b7593110f61eeb7cb58269d62bdd"></a><!-- doxytag: member="sf::Sound::GetPlayingOffset" ref="02e2b7593110f61eeb7cb58269d62bdd" args="() const" --> +<a class="anchor" name="1536095045923a2332dd9eed6bf8e96a"></a><!-- doxytag: member="sf::Sound::SetVolume" ref="1536095045923a2332dd9eed6bf8e96a" args="(float Volume)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">float sf::Sound::GetPlayingOffset </td> + <td class="memname">void sf::Sound::SetVolume </td> <td>(</td> - <td class="paramname"> </td> + <td class="paramtype">float </td> + <td class="paramname"> <em>Volume</em> </td> <td> ) </td> - <td width="100%"> const</td> + <td></td> </tr> </table> </div> <div class="memdoc"> <p> -Get the current playing position of the sound. +Set the sound volume. <p> -<dl class="return" compact><dt><b>Returns:</b></dt><dd>Current playing position, expressed in seconds </dd></dl> +The default volume is 100<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>Volume</em> </td><td>: Volume (in range [0, 100]) </td></tr> + </table> +</dl> + +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00153">153</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> -<p> -Reimplemented in <a class="el" href="classsf_1_1SoundStream.htm#558e41d5d623e83bc2c9a178b0456f95">sf::SoundStream</a>. </div> </div><p> -<a class="anchor" name="f4115769f723a405f5561b4c68f2f45e"></a><!-- doxytag: member="sf::Sound::operator=" ref="f4115769f723a405f5561b4c68f2f45e" args="(const Sound &Other)" --> +<a class="anchor" name="b1f5f103f737c52ceb0b1a067b4d0630"></a><!-- doxytag: member="sf::Sound::Stop" ref="b1f5f103f737c52ceb0b1a067b4d0630" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname"><a class="el" href="classsf_1_1Sound.htm">Sound</a>& sf::Sound::operator= </td> + <td class="memname">void sf::Sound::Stop </td> <td>(</td> - <td class="paramtype">const <a class="el" href="classsf_1_1Sound.htm">Sound</a> & </td> - <td class="paramname"> <em>Other</em> </td> + <td class="paramname"> </td> <td> ) </td> - <td width="100%"></td> + <td></td> </tr> </table> </div> <div class="memdoc"> <p> -Assignment operator. +Stop the sound. <p> -<dl compact><dt><b>Parameters:</b></dt><dd> - <table border="0" cellspacing="2" cellpadding="0"> - <tr><td valign="top"></td><td valign="top"><em>Other</em> </td><td>: Instance to assign</td></tr> - </table> -</dl> -<dl class="return" compact><dt><b>Returns:</b></dt><dd>Reference to the sound </dd></dl> + +<p>Reimplemented in <a class="el" href="classsf_1_1SoundStream.htm#53c9e9b160bcbcc89c93c1682b4525df">sf::SoundStream</a>.</p> + +<p>Definition at line <a class="el" href="Sound_8cpp-source.htm#l00116">116</a> of file <a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a>.</p> </div> </div><p> -<hr>The documentation for this class was generated from the following file:<ul> -<li><a class="el" href="Sound_8hpp-source.htm">Sound.hpp</a></ul> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="Sound_8hpp-source.htm">Sound.hpp</a><li><a class="el" href="Sound_8cpp-source.htm">Sound.cpp</a></ul> +</div> <p id="footer"> :: Copyright © 2007-2008 Laurent Gomila, all rights reserved :: |