summaryrefslogtreecommitdiff
path: root/doc/html/SoundStream_8hpp-source.htm
diff options
context:
space:
mode:
authorChristoph Egger <Christoph.Egger@gmx.de>2008-05-20 13:58:13 +0200
committerChristoph Egger <Christoph.Egger@gmx.de>2008-05-20 13:58:13 +0200
commitff2dd2d0218cea258446af2c781298192404aa68 (patch)
treed36a5a7e71af593c65882d46619716cb0d82789d /doc/html/SoundStream_8hpp-source.htm
Imported Upstream version 1.2
Diffstat (limited to 'doc/html/SoundStream_8hpp-source.htm')
-rwxr-xr-xdoc/html/SoundStream_8hpp-source.htm127
1 files changed, 127 insertions, 0 deletions
diff --git a/doc/html/SoundStream_8hpp-source.htm b/doc/html/SoundStream_8hpp-source.htm
new file mode 100755
index 0000000..6279c18
--- /dev/null
+++ b/doc/html/SoundStream_8hpp-source.htm
@@ -0,0 +1,127 @@
+<!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&nbsp;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>SoundStream.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 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_SOUNDSTREAM_HPP</span>
+<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define SFML_SOUNDSTREAM_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 &lt;SFML/Audio/Sound.hpp&gt;</span>
+<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;SFML/System/Thread.hpp&gt;</span>
+<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;cstdlib&gt;</span>
+<a name="l00034"></a>00034
+<a name="l00035"></a>00035
+<a name="l00036"></a>00036 <span class="keyword">namespace </span>sf
+<a name="l00037"></a>00037 {
+<a name="l00044"></a><a class="code" href="classsf_1_1SoundStream.htm">00044</a> <span class="keyword">class </span>SFML_API SoundStream : <span class="keyword">private</span> <a class="code" href="classsf_1_1Thread.htm" title="Thread defines an easy way to manipulate a thread.">Thread</a>, <span class="keyword">private</span> <a class="code" href="classsf_1_1Sound.htm" title="Sound defines the properties of the sound such as position, volume, pitch, etc.">Sound</a>
+<a name="l00045"></a>00045 {
+<a name="l00046"></a>00046 <span class="keyword">public</span> :
+<a name="l00047"></a>00047
+<a name="l00048"></a>00048 <span class="keyword">using</span> <a class="code" href="classsf_1_1Sound.htm#28ad2186cde78fed2c79c867b9622195" title="Enumeration of the sound states.">Sound::Status</a>;
+<a name="l00049"></a>00049 <span class="keyword">using</span> <a class="code" href="classsf_1_1Sound.htm#28ad2186cde78fed2c79c867b962219539fd53aa83db9189ca2fff82e0553cf9" title="Sound is not playing.">Sound::Stopped</a>;
+<a name="l00050"></a>00050 <span class="keyword">using</span> <a class="code" href="classsf_1_1Sound.htm#28ad2186cde78fed2c79c867b9622195c9fedbd48103548431e7851d16be5f4f" title="Sound is paused.">Sound::Paused</a>;
+<a name="l00051"></a>00051 <span class="keyword">using</span> <a class="code" href="classsf_1_1Sound.htm#28ad2186cde78fed2c79c867b962219516657b221888cf11e2a076f5b2783288" title="Sound is playing.">Sound::Playing</a>;
+<a name="l00052"></a>00052 <span class="keyword">using</span> <a class="code" href="classsf_1_1Sound.htm#6a712910ac1340f32e3ec3a04295ebd3" title="Pause the sound.">Sound::Pause</a>;
+<a name="l00053"></a>00053 <span class="keyword">using</span> <a class="code" href="classsf_1_1Sound.htm#f93301feb88770789ba7cd993c9dd3a0" title="Set the sound pitch.">Sound::SetPitch</a>;
+<a name="l00054"></a>00054 <span class="keyword">using</span> <a class="code" href="classsf_1_1Sound.htm#1536095045923a2332dd9eed6bf8e96a" title="Set the sound volume.">Sound::SetVolume</a>;
+<a name="l00055"></a>00055 <span class="keyword">using</span> <a class="code" href="classsf_1_1Sound.htm#b445e8738218525d8dd067628bc70c78" title="Set the sound position.">Sound::SetPosition</a>;
+<a name="l00056"></a>00056 <span class="keyword">using</span> <a class="code" href="classsf_1_1Sound.htm#b591af704d910f620343685ce3916c80" title="Get the pitch.">Sound::GetPitch</a>;
+<a name="l00057"></a>00057 <span class="keyword">using</span> <a class="code" href="classsf_1_1Sound.htm#6990c8406bdb13d82d13d662a1b7423e" title="Get the volume.">Sound::GetVolume</a>;
+<a name="l00058"></a>00058 <span class="keyword">using</span> <a class="code" href="classsf_1_1Sound.htm#82a9a8a5c4fbd9aac1fb42f7910f7f6a" title="Get the sound position.">Sound::GetPosition</a>;
+<a name="l00059"></a>00059
+<a name="l00063"></a><a class="code" href="structsf_1_1SoundStream_1_1Chunk.htm">00063</a> <span class="keyword">struct </span><a class="code" href="structsf_1_1SoundStream_1_1Chunk.htm" title="Structure defining a chunk of audio data to stream.">Chunk</a>
+<a name="l00064"></a>00064 {
+<a name="l00065"></a><a class="code" href="structsf_1_1SoundStream_1_1Chunk.htm#c7a44423bcd7cf2c451f3bd1e00b6a9f">00065</a> <span class="keyword">const</span> Int16* Samples;
+<a name="l00066"></a><a class="code" href="structsf_1_1SoundStream_1_1Chunk.htm#a5eb3db49e38752d27f7d7246907c5af">00066</a> std::size_t NbSamples;
+<a name="l00067"></a>00067 };
+<a name="l00068"></a>00068
+<a name="l00073"></a>00073 <span class="keyword">virtual</span> ~SoundStream();
+<a name="l00074"></a>00074
+<a name="l00079"></a>00079 <span class="keywordtype">void</span> Play();
+<a name="l00080"></a>00080
+<a name="l00085"></a>00085 <span class="keywordtype">void</span> Stop();
+<a name="l00086"></a>00086
+<a name="l00093"></a>00093 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> GetChannelsCount() <span class="keyword">const</span>;
+<a name="l00094"></a>00094
+<a name="l00101"></a>00101 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> GetSampleRate() <span class="keyword">const</span>;
+<a name="l00102"></a>00102
+<a name="l00109"></a>00109 <a class="code" href="classsf_1_1Sound.htm#28ad2186cde78fed2c79c867b9622195" title="Enumeration of the sound states.">Status</a> GetStatus() <span class="keyword">const</span>;
+<a name="l00110"></a>00110
+<a name="l00111"></a>00111 <span class="keyword">protected</span> :
+<a name="l00112"></a>00112
+<a name="l00117"></a>00117 SoundStream();
+<a name="l00118"></a>00118
+<a name="l00126"></a>00126 <span class="keywordtype">void</span> Initialize(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> ChannelsCount, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> SampleRate);
+<a name="l00127"></a>00127
+<a name="l00128"></a>00128 <span class="keyword">private</span> :
+<a name="l00129"></a>00129
+<a name="l00134"></a>00134 <span class="keyword">virtual</span> <span class="keywordtype">void</span> Run();
+<a name="l00135"></a>00135
+<a name="l00142"></a>00142 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> OnStart();
+<a name="l00143"></a>00143
+<a name="l00152"></a>00152 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> OnGetData(<a class="code" href="structsf_1_1SoundStream_1_1Chunk.htm" title="Structure defining a chunk of audio data to stream.">Chunk</a>&amp; Data) = 0;
+<a name="l00153"></a>00153
+<a name="l00158"></a>00158 <span class="keywordtype">void</span> CleanUp();
+<a name="l00159"></a>00159
+<a name="l00160"></a>00160 <span class="keyword">enum</span> {BuffersCount = 2};
+<a name="l00161"></a>00161
+<a name="l00163"></a>00163 <span class="comment">// Member data</span>
+<a name="l00165"></a>00165 <span class="comment"></span> <span class="keywordtype">bool</span> myIsStreaming;
+<a name="l00166"></a>00166 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> myBuffers[BuffersCount];
+<a name="l00167"></a>00167 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> myChannelsCount;
+<a name="l00168"></a>00168 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> mySampleRate;
+<a name="l00169"></a>00169 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> myFormat;
+<a name="l00170"></a>00170 };
+<a name="l00171"></a>00171
+<a name="l00172"></a>00172 } <span class="comment">// namespace sf</span>
+<a name="l00173"></a>00173
+<a name="l00174"></a>00174
+<a name="l00175"></a>00175 <span class="preprocessor">#endif // SFML_SOUNDSTREAM_HPP</span>
+</pre></div>
+ <p id="footer">
+ &nbsp;::&nbsp; Copyright &copy; 2007 Laurent Gomila, all rights reserved &nbsp;::&nbsp;
+ Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen 1.5.2</a> &nbsp;::&nbsp;
+ </p>
+
+ </body>
+</html>