diff options
Diffstat (limited to 'doc/html/Sound_8hpp-source.htm')
-rwxr-xr-x | doc/html/Sound_8hpp-source.htm | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/doc/html/Sound_8hpp-source.htm b/doc/html/Sound_8hpp-source.htm new file mode 100755 index 0000000..568a401 --- /dev/null +++ b/doc/html/Sound_8hpp-source.htm @@ -0,0 +1,142 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> + <head> + <title>SFML - Simple and Fast Multimedia Library</title> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> + <link href="doxygen.css" rel="stylesheet" type="text/css" /> + <link href="tabs.css" rel="stylesheet" type="text/css" /> + </head> + <body> + <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><a href="classes.htm"><span>Classes</span></a></li> + <li class="current"><a href="files.htm"><span>Files</span></a></li> + </ul> +</div> +<h1>Sound.hpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 +<a name="l00002"></a>00002 <span class="comment">//</span> +<a name="l00003"></a>00003 <span class="comment">// SFML - Simple and Fast Multimedia Library</span> +<a name="l00004"></a>00004 <span class="comment">// Copyright (C) 2007-2008 Laurent Gomila (laurent.gom@gmail.com)</span> +<a name="l00005"></a>00005 <span class="comment">//</span> +<a name="l00006"></a>00006 <span class="comment">// This software is provided 'as-is', without any express or implied warranty.</span> +<a name="l00007"></a>00007 <span class="comment">// In no event will the authors be held liable for any damages arising from the use of this software.</span> +<a name="l00008"></a>00008 <span class="comment">//</span> +<a name="l00009"></a>00009 <span class="comment">// Permission is granted to anyone to use this software for any purpose,</span> +<a name="l00010"></a>00010 <span class="comment">// including commercial applications, and to alter it and redistribute it freely,</span> +<a name="l00011"></a>00011 <span class="comment">// subject to the following restrictions:</span> +<a name="l00012"></a>00012 <span class="comment">//</span> +<a name="l00013"></a>00013 <span class="comment">// 1. The origin of this software must not be misrepresented;</span> +<a name="l00014"></a>00014 <span class="comment">// you must not claim that you wrote the original software.</span> +<a name="l00015"></a>00015 <span class="comment">// If you use this software in a product, an acknowledgment</span> +<a name="l00016"></a>00016 <span class="comment">// in the product documentation would be appreciated but is not required.</span> +<a name="l00017"></a>00017 <span class="comment">//</span> +<a name="l00018"></a>00018 <span class="comment">// 2. Altered source versions must be plainly marked as such,</span> +<a name="l00019"></a>00019 <span class="comment">// and must not be misrepresented as being the original software.</span> +<a name="l00020"></a>00020 <span class="comment">//</span> +<a name="l00021"></a>00021 <span class="comment">// 3. This notice may not be removed or altered from any source distribution.</span> +<a name="l00022"></a>00022 <span class="comment">//</span> +<a name="l00024"></a>00024 <span class="comment"></span> +<a name="l00025"></a>00025 <span class="preprocessor">#ifndef SFML_SOUND_HPP</span> +<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define SFML_SOUND_HPP</span> +<a name="l00027"></a>00027 <span class="preprocessor"></span> +<a name="l00029"></a>00029 <span class="comment">// Headers</span> +<a name="l00031"></a>00031 <span class="comment"></span><span class="preprocessor">#include <SFML/System/Resource.hpp></span> +<a name="l00032"></a>00032 <span class="preprocessor">#include <SFML/System/Vector3.hpp></span> +<a name="l00033"></a>00033 <span class="preprocessor">#include <SFML/Audio/AudioResource.hpp></span> +<a name="l00034"></a>00034 <span class="preprocessor">#include <cstdlib></span> +<a name="l00035"></a>00035 +<a name="l00036"></a>00036 +<a name="l00037"></a>00037 <span class="keyword">namespace </span>sf +<a name="l00038"></a>00038 { +<a name="l00039"></a>00039 <span class="keyword">class </span>SoundBuffer; +<a name="l00040"></a>00040 +<a name="l00045"></a><a class="code" href="classsf_1_1Sound.htm">00045</a> <span class="keyword">class </span>SFML_API Sound : <span class="keyword">public</span> <a class="code" href="classsf_1_1AudioResource.htm" title="Abstract base class for every class that owns a device-dependant resource -- allow...">AudioResource</a> +<a name="l00046"></a>00046 { +<a name="l00047"></a>00047 <span class="keyword">public</span> : +<a name="l00048"></a>00048 +<a name="l00052"></a><a class="code" href="classsf_1_1Sound.htm#28ad2186cde78fed2c79c867b9622195">00052</a> <span class="keyword">enum</span> <a class="code" href="classsf_1_1Sound.htm#28ad2186cde78fed2c79c867b9622195" title="Enumeration of the sound states.">Status</a> +<a name="l00053"></a>00053 { +<a name="l00054"></a><a class="code" href="classsf_1_1Sound.htm#28ad2186cde78fed2c79c867b962219539fd53aa83db9189ca2fff82e0553cf9">00054</a> Stopped, +<a name="l00055"></a><a class="code" href="classsf_1_1Sound.htm#28ad2186cde78fed2c79c867b9622195c9fedbd48103548431e7851d16be5f4f">00055</a> Paused, +<a name="l00056"></a><a class="code" href="classsf_1_1Sound.htm#28ad2186cde78fed2c79c867b962219516657b221888cf11e2a076f5b2783288">00056</a> Playing +<a name="l00057"></a>00057 }; +<a name="l00058"></a>00058 +<a name="l00063"></a>00063 Sound(); +<a name="l00064"></a>00064 +<a name="l00075"></a>00075 Sound(<span class="keyword">const</span> <a class="code" href="classsf_1_1SoundBuffer.htm" title="SoundBuffer is the low-level for loading and manipulating sound buffers.">SoundBuffer</a>& Buffer, <span class="keywordtype">bool</span> Loop = <span class="keyword">false</span>, <span class="keywordtype">float</span> Pitch = 1.f, <span class="keywordtype">float</span> Volume = 100.f, <span class="keyword">const</span> <a class="code" href="classsf_1_1Vector3.htm" title="Vector3 is an utility class for manipulating 3 dimensional vectors.">Vector3f</a>& Position = <a class="code" href="namespacesf.htm#f97357d7d32e7d6a700d03be2f3b4811">Vector3f</a>(0, 0, 0)); +<a name="l00076"></a>00076 +<a name="l00083"></a>00083 Sound(<span class="keyword">const</span> Sound& Copy); +<a name="l00084"></a>00084 +<a name="l00089"></a>00089 ~Sound(); +<a name="l00090"></a>00090 +<a name="l00095"></a>00095 <span class="keywordtype">void</span> Play(); +<a name="l00096"></a>00096 +<a name="l00101"></a>00101 <span class="keywordtype">void</span> Pause(); +<a name="l00102"></a>00102 +<a name="l00107"></a>00107 <span class="keywordtype">void</span> Stop(); +<a name="l00108"></a>00108 +<a name="l00115"></a>00115 <span class="keywordtype">void</span> SetBuffer(<span class="keyword">const</span> <a class="code" href="classsf_1_1SoundBuffer.htm" title="SoundBuffer is the low-level for loading and manipulating sound buffers.">SoundBuffer</a>& Buffer); +<a name="l00116"></a>00116 +<a name="l00124"></a>00124 <span class="keywordtype">void</span> SetLoop(<span class="keywordtype">bool</span> Loop); +<a name="l00125"></a>00125 +<a name="l00133"></a>00133 <span class="keywordtype">void</span> SetPitch(<span class="keywordtype">float</span> Pitch); +<a name="l00134"></a>00134 +<a name="l00142"></a>00142 <span class="keywordtype">void</span> SetVolume(<span class="keywordtype">float</span> Volume); +<a name="l00143"></a>00143 +<a name="l00151"></a>00151 <span class="keywordtype">void</span> SetPosition(<span class="keywordtype">float</span> X, <span class="keywordtype">float</span> Y, <span class="keywordtype">float</span> Z); +<a name="l00152"></a>00152 +<a name="l00160"></a>00160 <span class="keywordtype">void</span> SetPosition(<span class="keyword">const</span> <a class="code" href="classsf_1_1Vector3.htm" title="Vector3 is an utility class for manipulating 3 dimensional vectors.">Vector3f</a>& Position); +<a name="l00161"></a>00161 +<a name="l00170"></a>00170 <span class="keywordtype">void</span> SetMinDistance(<span class="keywordtype">float</span> MinDistance); +<a name="l00171"></a>00171 +<a name="l00180"></a>00180 <span class="keywordtype">void</span> SetAttenuation(<span class="keywordtype">float</span> Attenuation); +<a name="l00181"></a>00181 +<a name="l00188"></a>00188 <span class="keywordtype">void</span> SetPlayingOffset(<span class="keywordtype">float</span> TimeOffset); +<a name="l00189"></a>00189 +<a name="l00196"></a>00196 <span class="keyword">const</span> <a class="code" href="classsf_1_1SoundBuffer.htm" title="SoundBuffer is the low-level for loading and manipulating sound buffers.">SoundBuffer</a>* GetBuffer() <span class="keyword">const</span>; +<a name="l00197"></a>00197 +<a name="l00204"></a>00204 <span class="keywordtype">bool</span> GetLoop() <span class="keyword">const</span>; +<a name="l00205"></a>00205 +<a name="l00212"></a>00212 <span class="keywordtype">float</span> GetPitch() <span class="keyword">const</span>; +<a name="l00213"></a>00213 +<a name="l00220"></a>00220 <span class="keywordtype">float</span> GetVolume() <span class="keyword">const</span>; +<a name="l00221"></a>00221 +<a name="l00228"></a>00228 <a class="code" href="classsf_1_1Vector3.htm" title="Vector3 is an utility class for manipulating 3 dimensional vectors.">Vector3f</a> GetPosition() <span class="keyword">const</span>; +<a name="l00229"></a>00229 +<a name="l00236"></a>00236 <span class="keywordtype">float</span> GetMinDistance() <span class="keyword">const</span>; +<a name="l00237"></a>00237 +<a name="l00244"></a>00244 <span class="keywordtype">float</span> GetAttenuation() <span class="keyword">const</span>; +<a name="l00245"></a>00245 +<a name="l00252"></a>00252 Status GetStatus() <span class="keyword">const</span>; +<a name="l00253"></a>00253 +<a name="l00260"></a>00260 <span class="keywordtype">float</span> GetPlayingOffset() <span class="keyword">const</span>; +<a name="l00261"></a>00261 +<a name="l00270"></a>00270 Sound& operator =(<span class="keyword">const</span> Sound& Other); +<a name="l00271"></a>00271 +<a name="l00272"></a>00272 <span class="keyword">private</span> : +<a name="l00273"></a>00273 +<a name="l00274"></a><a class="code" href="classsf_1_1Sound.htm#22d0a4fe764bba1f30b58224b1f8855e">00274</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classsf_1_1SoundStream.htm" title="SoundStream is a streamed sound, ie samples are acquired while the sound is playing...">SoundStream</a>; +<a name="l00275"></a>00275 +<a name="l00277"></a>00277 <span class="comment">// Member data</span> +<a name="l00279"></a>00279 <span class="comment"></span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> mySource; +<a name="l00280"></a>00280 <a class="code" href="classsf_1_1ResourcePtr.htm" title="Safe pointer to a T resource (inheriting from sf::Resource<T>), its pointer is automatically...">ResourcePtr<SoundBuffer></a> myBuffer; +<a name="l00281"></a>00281 }; +<a name="l00282"></a>00282 +<a name="l00283"></a>00283 } <span class="comment">// namespace sf</span> +<a name="l00284"></a>00284 +<a name="l00285"></a>00285 +<a name="l00286"></a>00286 <span class="preprocessor">#endif // SFML_SOUND_HPP</span> +</pre></div> + <p id="footer"> + :: Copyright © 2007-2008 Laurent Gomila, all rights reserved :: + Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen 1.5.2</a> :: + </p> + + </body> +</html> |