diff options
Diffstat (limited to 'doc/html/classsf_1_1Music.htm')
-rwxr-xr-x | doc/html/classsf_1_1Music.htm | 389 |
1 files changed, 228 insertions, 161 deletions
diff --git a/doc/html/classsf_1_1Music.htm b/doc/html/classsf_1_1Music.htm index 25523c4..cbcf84b 100755 --- a/doc/html/classsf_1_1Music.htm +++ b/doc/html/classsf_1_1Music.htm @@ -10,39 +10,52 @@ <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_1Music.htm">Music</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_1Music.htm">Music</a> + </div> +</div> +<div class="contents"> <h1>sf::Music Class Reference</h1><!-- doxytag: class="sf::Music" --><!-- doxytag: inherits="sf::SoundStream" --><a class="el" href="classsf_1_1Music.htm" title="Music defines a big sound played using streaming, so usually what we call a music...">Music</a> defines a big sound played using streaming, so usually what we call a music :). <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="Music_8hpp-source.htm">Music.hpp</a>></code> <p> -<p>Inheritance diagram for sf::Music: +<div class="dynheader"> +Inheritance diagram for sf::Music:</div> +<div class="dynsection"> + <p><center><img src="classsf_1_1Music.png" usemap="#sf::Music_map" border="0" alt=""></center> <map name="sf::Music_map"> <area href="classsf_1_1SoundStream.htm" alt="sf::SoundStream" shape="rect" coords="56,56,159,80"> <area href="classsf_1_1Thread.htm" alt="sf::Thread" shape="rect" coords="0,0,103,24"> <area href="classsf_1_1Sound.htm" alt="sf::Sound" shape="rect" coords="113,0,216,24"> </map> +</div> + +<p> <a href="classsf_1_1Music-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> +<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.htm#28ad2186cde78fed2c79c867b9622195">Status</a> </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Enumeration of the sound states. <a href="classsf_1_1SoundStream.htm#28ad2186cde78fed2c79c867b9622195">More...</a><br></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="classsf_1_1Music.htm#18db20495fc566e5f9c26fcfe1a5dff6">Music</a> (std::size_t BufferSize=44100)</td></tr> @@ -56,33 +69,33 @@ <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Music.htm#07896cadcaf54e2998e0f91fb2d6d017">OpenFromMemory</a> (const char *Data, std::size_t SizeInBytes)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Open a music file from memory (doesn't play it -- call <a class="el" href="classsf_1_1SoundStream.htm#4d8437ef9a952fe3798bd239ff20d9bf" title="Start playing the audio stream.">Play()</a> for that). <a href="#07896cadcaf54e2998e0f91fb2d6d017"></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_1Music.htm#c6e994823e8e6d297c07766495a472e5">GetDuration</a> () const</td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Music.htm#dbda9cff41ec10cb85db056cf67e5e50">GetDuration</a> () const </td></tr> -<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the music duration. <a href="#c6e994823e8e6d297c07766495a472e5"></a><br></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the music duration. <a href="#dbda9cff41ec10cb85db056cf67e5e50"></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_1SoundStream.htm#4d8437ef9a952fe3798bd239ff20d9bf">Play</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Start playing the audio stream. <a href="#4d8437ef9a952fe3798bd239ff20d9bf"></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_1SoundStream.htm#53c9e9b160bcbcc89c93c1682b4525df">Stop</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Stop playing the audio stream. <a href="#53c9e9b160bcbcc89c93c1682b4525df"></a><br></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.htm#fb9692455fa3a358691eb600d7570ed8">GetChannelsCount</a> () const</td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.htm#bdcb5c8f3b5884a27e2eb013f5e36858">GetChannelsCount</a> () const </td></tr> -<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the number of channels (1 = mono, 2 = stereo). <a href="#fb9692455fa3a358691eb600d7570ed8"></a><br></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.htm#8a14601b49a6dfdbc1de886a4d677e1b">GetSampleRate</a> () const</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the number of channels (1 = mono, 2 = stereo). <a href="#bdcb5c8f3b5884a27e2eb013f5e36858"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.htm#74dabd1177bb60c8bd64bb6bbedb64bc">GetSampleRate</a> () const </td></tr> -<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the stream sample rate. <a href="#8a14601b49a6dfdbc1de886a4d677e1b"></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_1SoundStream.htm#308ef2a984db4cfd0b8e1bf8b1e8e4c0">GetStatus</a> () const</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the stream sample rate. <a href="#74dabd1177bb60c8bd64bb6bbedb64bc"></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_1SoundStream.htm#cef2468ca4bc3e8ced76b11fb95c7ef2">GetStatus</a> () const </td></tr> -<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the status of the stream (stopped, paused, playing). <a href="#308ef2a984db4cfd0b8e1bf8b1e8e4c0"></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_1SoundStream.htm#558e41d5d623e83bc2c9a178b0456f95">GetPlayingOffset</a> () const</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the status of the stream (stopped, paused, playing). <a href="#cef2468ca4bc3e8ced76b11fb95c7ef2"></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_1SoundStream.htm#d11fee9eb4baba68d6ed9f44bc6170ac">GetPlayingOffset</a> () const </td></tr> -<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the current playing position of the stream. <a href="#558e41d5d623e83bc2c9a178b0456f95"></a><br></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the current playing position of the stream. <a href="#d11fee9eb4baba68d6ed9f44bc6170ac"></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_1SoundStream.htm#1072090152b10d83f43f0cd6bbd82b4e">SetLoop</a> (bool Loop)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the stream loop state. <a href="#1072090152b10d83f43f0cd6bbd82b4e"></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_1SoundStream.htm#8f5f5aaba5aebc45fc008e952c0ae530">GetLoop</a> () const</td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.htm#caecb1c68af4a9d75f9e9ad2d42afa78">GetLoop</a> () const </td></tr> -<tr><td class="mdescLeft"> </td><td class="mdescRight">Tell whether or not the stream is looping. <a href="#8f5f5aaba5aebc45fc008e952c0ae530"></a><br></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Tell whether or not the stream is looping. <a href="#caecb1c68af4a9d75f9e9ad2d42afa78"></a><br></td></tr> <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.htm#ed9b6b06c0fa9c2d0b8c094eb2826793">Initialize</a> (unsigned int ChannelsCount, unsigned int SampleRate)</td></tr> @@ -90,10 +103,28 @@ </table> <hr><a name="_details"></a><h2>Detailed Description</h2> <a class="el" href="classsf_1_1Music.htm" title="Music defines a big sound played using streaming, so usually what we call a music...">Music</a> defines a big sound played using streaming, so usually what we call a music :). -<p> +<p>Definition at line <a class="el" href="Music_8hpp-source.htm#l00047">47</a> of file <a class="el" href="Music_8hpp-source.htm">Music.hpp</a>.</p> +<hr><h2>Member Enumeration Documentation</h2> +<a class="anchor" name="28ad2186cde78fed2c79c867b9622195"></a><!-- doxytag: member="sf::Music::Status" ref="28ad2186cde78fed2c79c867b9622195" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">enum <a class="el" href="classsf_1_1Sound.htm#28ad2186cde78fed2c79c867b9622195">sf::Sound::Status</a><code> [inherited]</code> </td> + </tr> + </table> +</div> +<div class="memdoc"> <p> -Definition at line <a class="el" href="Music_8hpp-source.htm#l00047">47</a> of file <a class="el" href="Music_8hpp-source.htm">Music.hpp</a>.<hr><h2>Constructor & Destructor Documentation</h2> +Enumeration of the sound states. +<p> + +<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> <a class="anchor" name="18db20495fc566e5f9c26fcfe1a5dff6"></a><!-- doxytag: member="sf::Music::Music" ref="18db20495fc566e5f9c26fcfe1a5dff6" args="(std::size_t BufferSize=44100)" --> <div class="memitem"> <div class="memproto"> @@ -104,7 +135,7 @@ Definition at line <a class="el" href="Music_8hpp-source.htm#l00047">47</a> of f <td class="paramtype">std::size_t </td> <td class="paramname"> <em>BufferSize</em> = <code>44100</code> </td> <td> ) </td> - <td width="100%"></td> + <td></td> </tr> </table> </div> @@ -119,6 +150,8 @@ Construct the music with a buffer size. </table> </dl> +<p>Definition at line <a class="el" href="Music_8cpp-source.htm#l00040">40</a> of file <a class="el" href="Music_8cpp-source.htm">Music.cpp</a>.</p> + </div> </div><p> <a class="anchor" name="4c65860fed2f01d0eaa6c4199870414b"></a><!-- doxytag: member="sf::Music::~Music" ref="4c65860fed2f01d0eaa6c4199870414b" args="()" --> @@ -130,7 +163,7 @@ Construct the music with a buffer size. <td>(</td> <td class="paramname"> </td> <td> ) </td> - <td width="100%"></td> + <td></td> </tr> </table> </div> @@ -140,233 +173,299 @@ Construct the music with a buffer size. Destructor. <p> +<p>Definition at line <a class="el" href="Music_8cpp-source.htm#l00052">52</a> of file <a class="el" href="Music_8cpp-source.htm">Music.cpp</a>.</p> + </div> </div><p> <hr><h2>Member Function Documentation</h2> -<a class="anchor" name="26986766bc5674a87da1bcb10bef59db"></a><!-- doxytag: member="sf::Music::OpenFromFile" ref="26986766bc5674a87da1bcb10bef59db" args="(const std::string &Filename)" --> +<a class="anchor" name="bdcb5c8f3b5884a27e2eb013f5e36858"></a><!-- doxytag: member="sf::Music::GetChannelsCount" ref="bdcb5c8f3b5884a27e2eb013f5e36858" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">bool sf::Music::OpenFromFile </td> + <td class="memname">unsigned int sf::SoundStream::GetChannelsCount </td> <td>(</td> - <td class="paramtype">const std::string & </td> - <td class="paramname"> <em>Filename</em> </td> + <td class="paramname"> </td> <td> ) </td> - <td width="100%"></td> + <td> const<code> [inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p> -Open a music file (doesn't play it -- call <a class="el" href="classsf_1_1SoundStream.htm#4d8437ef9a952fe3798bd239ff20d9bf" title="Start playing the audio stream.">Play()</a> for that). +Return the number of channels (1 = mono, 2 = stereo). <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>Filename</em> </td><td>: Path of the music file to open</td></tr> - </table> -</dl> -<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if loading has been successful </dd></dl> +Return the number of channels (1 = mono, 2 = stereo, .<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of channels</dd></dl> +..) +<p>Definition at line <a class="el" href="SoundStream_8cpp-source.htm#l00126">126</a> of file <a class="el" href="SoundStream_8cpp-source.htm">SoundStream.cpp</a>.</p> </div> </div><p> -<a class="anchor" name="07896cadcaf54e2998e0f91fb2d6d017"></a><!-- doxytag: member="sf::Music::OpenFromMemory" ref="07896cadcaf54e2998e0f91fb2d6d017" args="(const char *Data, std::size_t SizeInBytes)" --> +<a class="anchor" name="dbda9cff41ec10cb85db056cf67e5e50"></a><!-- doxytag: member="sf::Music::GetDuration" ref="dbda9cff41ec10cb85db056cf67e5e50" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">bool sf::Music::OpenFromMemory </td> + <td class="memname">float sf::Music::GetDuration </td> <td>(</td> - <td class="paramtype">const char * </td> - <td class="paramname"> <em>Data</em>, </td> - </tr> - <tr> - <td class="paramkey"></td> - <td></td> - <td class="paramtype">std::size_t </td> - <td class="paramname"> <em>SizeInBytes</em></td><td> </td> - </tr> - <tr> - <td></td> - <td>)</td> - <td></td><td></td><td width="100%"></td> + <td class="paramname"> </td> + <td> ) </td> + <td> const</td> </tr> </table> </div> <div class="memdoc"> <p> -Open a music file from memory (doesn't play it -- call <a class="el" href="classsf_1_1SoundStream.htm#4d8437ef9a952fe3798bd239ff20d9bf" title="Start playing the audio stream.">Play()</a> for that). +Get the music duration. <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>Data</em> </td><td>: Pointer to the file data in memory </td></tr> - <tr><td valign="top"></td><td valign="top"><em>SizeInBytes</em> </td><td>: Size of the data to load, in bytes</td></tr> - </table> -</dl> -<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if loading has been successful </dd></dl> +Get the sound duration.<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd><a class="el" href="classsf_1_1Music.htm" title="Music defines a big sound played using streaming, so usually what we call a music...">Music</a> duration, in seconds </dd></dl> + +<p>Definition at line <a class="el" href="Music_8cpp-source.htm#l00148">148</a> of file <a class="el" href="Music_8cpp-source.htm">Music.cpp</a>.</p> </div> </div><p> -<a class="anchor" name="c6e994823e8e6d297c07766495a472e5"></a><!-- doxytag: member="sf::Music::GetDuration" ref="c6e994823e8e6d297c07766495a472e5" args="() const" --> +<a class="anchor" name="caecb1c68af4a9d75f9e9ad2d42afa78"></a><!-- doxytag: member="sf::Music::GetLoop" ref="caecb1c68af4a9d75f9e9ad2d42afa78" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">float sf::Music::GetDuration </td> + <td class="memname">bool sf::SoundStream::GetLoop </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> - <td width="100%"> const</td> + <td> const<code> [inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p> -Get the music duration. +Tell whether or not the stream is looping. <p> -<dl class="return" compact><dt><b>Returns:</b></dt><dd><a class="el" href="classsf_1_1Music.htm" title="Music defines a big sound played using streaming, so usually what we call a music...">Music</a> duration, in seconds </dd></dl> +Tell whether or not the music is looping.<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if the music is looping, false otherwise </dd></dl> + +<p>Reimplemented from <a class="el" href="classsf_1_1Sound.htm#5cdc44ade7bda8db2d0431701d72495e">sf::Sound</a>.</p> + +<p>Definition at line <a class="el" href="SoundStream_8cpp-source.htm#l00180">180</a> of file <a class="el" href="SoundStream_8cpp-source.htm">SoundStream.cpp</a>.</p> </div> </div><p> -<a class="anchor" name="4d8437ef9a952fe3798bd239ff20d9bf"></a><!-- doxytag: member="sf::Music::Play" ref="4d8437ef9a952fe3798bd239ff20d9bf" args="()" --> +<a class="anchor" name="d11fee9eb4baba68d6ed9f44bc6170ac"></a><!-- doxytag: member="sf::Music::GetPlayingOffset" ref="d11fee9eb4baba68d6ed9f44bc6170ac" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">void sf::SoundStream::Play </td> + <td class="memname">float sf::SoundStream::GetPlayingOffset </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> - <td width="100%"><code> [inherited]</code></td> + <td> const<code> [inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p> -Start playing the audio stream. +Get the current playing position of the stream. <p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>Current playing position, expressed in seconds<p> +Current playing position, expressed in seconds </dd></dl> + +<p>Reimplemented from <a class="el" href="classsf_1_1Sound.htm#0e80c736a6865123be0c19e99f36467f">sf::Sound</a>.</p> + +<p>Definition at line <a class="el" href="SoundStream_8cpp-source.htm#l00162">162</a> of file <a class="el" href="SoundStream_8cpp-source.htm">SoundStream.cpp</a>.</p> -<p> -Reimplemented from <a class="el" href="classsf_1_1Sound.htm#fdafa7970587f04d3833b4095c2de1db">sf::Sound</a>. </div> </div><p> -<a class="anchor" name="53c9e9b160bcbcc89c93c1682b4525df"></a><!-- doxytag: member="sf::Music::Stop" ref="53c9e9b160bcbcc89c93c1682b4525df" args="()" --> +<a class="anchor" name="74dabd1177bb60c8bd64bb6bbedb64bc"></a><!-- doxytag: member="sf::Music::GetSampleRate" ref="74dabd1177bb60c8bd64bb6bbedb64bc" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">void sf::SoundStream::Stop </td> + <td class="memname">unsigned int sf::SoundStream::GetSampleRate </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> - <td width="100%"><code> [inherited]</code></td> + <td> const<code> [inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p> -Stop playing the audio stream. +Get the stream sample rate. <p> +Get the sound frequency (sample rate).<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>Stream frequency (number of samples per second) </dd></dl> + +<p>Definition at line <a class="el" href="SoundStream_8cpp-source.htm#l00135">135</a> of file <a class="el" href="SoundStream_8cpp-source.htm">SoundStream.cpp</a>.</p> -<p> -Reimplemented from <a class="el" href="classsf_1_1Sound.htm#b1f5f103f737c52ceb0b1a067b4d0630">sf::Sound</a>. </div> </div><p> -<a class="anchor" name="fb9692455fa3a358691eb600d7570ed8"></a><!-- doxytag: member="sf::Music::GetChannelsCount" ref="fb9692455fa3a358691eb600d7570ed8" args="() const" --> +<a class="anchor" name="cef2468ca4bc3e8ced76b11fb95c7ef2"></a><!-- doxytag: member="sf::Music::GetStatus" ref="cef2468ca4bc3e8ced76b11fb95c7ef2" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">unsigned int sf::SoundStream::GetChannelsCount </td> + <td class="memname"><a class="el" href="classsf_1_1Sound.htm#28ad2186cde78fed2c79c867b9622195">Sound::Status</a> sf::SoundStream::GetStatus </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> - <td width="100%"> const<code> [inherited]</code></td> + <td> const<code> [inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p> -Return the number of channels (1 = mono, 2 = stereo). +Get the status of the stream (stopped, paused, playing). <p> -<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of channels </dd></dl> +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 from <a class="el" href="classsf_1_1Sound.htm#76c97fca3a5092db606eb66461f063af">sf::Sound</a>.</p> + +<p>Definition at line <a class="el" href="SoundStream_8cpp-source.htm#l00144">144</a> of file <a class="el" href="SoundStream_8cpp-source.htm">SoundStream.cpp</a>.</p> </div> </div><p> -<a class="anchor" name="8a14601b49a6dfdbc1de886a4d677e1b"></a><!-- doxytag: member="sf::Music::GetSampleRate" ref="8a14601b49a6dfdbc1de886a4d677e1b" args="() const" --> +<a class="anchor" name="ed9b6b06c0fa9c2d0b8c094eb2826793"></a><!-- doxytag: member="sf::Music::Initialize" ref="ed9b6b06c0fa9c2d0b8c094eb2826793" args="(unsigned int ChannelsCount, unsigned int SampleRate)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">unsigned int sf::SoundStream::GetSampleRate </td> + <td class="memname">void sf::SoundStream::Initialize </td> <td>(</td> - <td class="paramname"> </td> - <td> ) </td> - <td width="100%"> const<code> [inherited]</code></td> + <td class="paramtype">unsigned int </td> + <td class="paramname"> <em>ChannelsCount</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">unsigned int </td> + <td class="paramname"> <em>SampleRate</em></td><td> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td><td><code> [protected, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p> -Get the stream sample rate. +Set the audio stream parameters, you must call it before <a class="el" href="classsf_1_1SoundStream.htm#4d8437ef9a952fe3798bd239ff20d9bf" title="Start playing the audio stream.">Play()</a>. <p> -<dl class="return" compact><dt><b>Returns:</b></dt><dd>Stream frequency (number of samples per second) </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>ChannelsCount</em> </td><td>: Number of channels </td></tr> + <tr><td valign="top"></td><td valign="top"><em>SampleRate</em> </td><td>: Sample rate </td></tr> + </table> +</dl> + +<p>Definition at line <a class="el" href="SoundStream_8cpp-source.htm#l00064">64</a> of file <a class="el" href="SoundStream_8cpp-source.htm">SoundStream.cpp</a>.</p> </div> </div><p> -<a class="anchor" name="308ef2a984db4cfd0b8e1bf8b1e8e4c0"></a><!-- doxytag: member="sf::Music::GetStatus" ref="308ef2a984db4cfd0b8e1bf8b1e8e4c0" args="() const" --> +<a class="anchor" name="26986766bc5674a87da1bcb10bef59db"></a><!-- doxytag: member="sf::Music::OpenFromFile" ref="26986766bc5674a87da1bcb10bef59db" args="(const std::string &Filename)" --> <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::SoundStream::GetStatus </td> + <td class="memname">bool sf::Music::OpenFromFile </td> <td>(</td> - <td class="paramname"> </td> + <td class="paramtype">const std::string & </td> + <td class="paramname"> <em>Filename</em> </td> <td> ) </td> - <td width="100%"> const<code> [inherited]</code></td> + <td></td> </tr> </table> </div> <div class="memdoc"> <p> -Get the status of the stream (stopped, paused, playing). +Open a music file (doesn't play it -- call <a class="el" href="classsf_1_1SoundStream.htm#4d8437ef9a952fe3798bd239ff20d9bf" title="Start playing the audio stream.">Play()</a> for that). <p> -<dl class="return" compact><dt><b>Returns:</b></dt><dd>Current status of the sound </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>Filename</em> </td><td>: Path of the music file to open</td></tr> + </table> +</dl> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if loading has been successful </dd></dl> + +<p>Definition at line <a class="el" href="Music_8cpp-source.htm#l00064">64</a> of file <a class="el" href="Music_8cpp-source.htm">Music.cpp</a>.</p> + +</div> +</div><p> +<a class="anchor" name="07896cadcaf54e2998e0f91fb2d6d017"></a><!-- doxytag: member="sf::Music::OpenFromMemory" ref="07896cadcaf54e2998e0f91fb2d6d017" args="(const char *Data, std::size_t SizeInBytes)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">bool sf::Music::OpenFromMemory </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"> <em>Data</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">std::size_t </td> + <td class="paramname"> <em>SizeInBytes</em></td><td> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td><td></td> + </tr> + </table> +</div> +<div class="memdoc"> <p> -Reimplemented from <a class="el" href="classsf_1_1Sound.htm#c2ffc93f9ffaddc50b9c9adb75581b55">sf::Sound</a>. +Open a music file from memory (doesn't play it -- call <a class="el" href="classsf_1_1SoundStream.htm#4d8437ef9a952fe3798bd239ff20d9bf" title="Start playing the audio stream.">Play()</a> for that). +<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>Data</em> </td><td>: Pointer to the file data in memory </td></tr> + <tr><td valign="top"></td><td valign="top"><em>SizeInBytes</em> </td><td>: Size of the data to load, in bytes</td></tr> + </table> +</dl> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if loading has been successful </dd></dl> + +<p>Definition at line <a class="el" href="Music_8cpp-source.htm#l00091">91</a> of file <a class="el" href="Music_8cpp-source.htm">Music.cpp</a>.</p> + </div> </div><p> -<a class="anchor" name="558e41d5d623e83bc2c9a178b0456f95"></a><!-- doxytag: member="sf::Music::GetPlayingOffset" ref="558e41d5d623e83bc2c9a178b0456f95" args="() const" --> +<a class="anchor" name="4d8437ef9a952fe3798bd239ff20d9bf"></a><!-- doxytag: member="sf::Music::Play" ref="4d8437ef9a952fe3798bd239ff20d9bf" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">float sf::SoundStream::GetPlayingOffset </td> + <td class="memname">void sf::SoundStream::Play </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> - <td width="100%"> const<code> [inherited]</code></td> + <td><code> [inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p> -Get the current playing position of the stream. +Start playing the audio stream. <p> -<dl class="return" compact><dt><b>Returns:</b></dt><dd>Current playing position, expressed in seconds </dd></dl> -<p> -Reimplemented from <a class="el" href="classsf_1_1Sound.htm#02e2b7593110f61eeb7cb58269d62bdd">sf::Sound</a>. +<p>Reimplemented from <a class="el" href="classsf_1_1Sound.htm#fdafa7970587f04d3833b4095c2de1db">sf::Sound</a>.</p> + +<p>Definition at line <a class="el" href="SoundStream_8cpp-source.htm#l00085">85</a> of file <a class="el" href="SoundStream_8cpp-source.htm">SoundStream.cpp</a>.</p> + </div> </div><p> <a class="anchor" name="1072090152b10d83f43f0cd6bbd82b4e"></a><!-- doxytag: member="sf::Music::SetLoop" ref="1072090152b10d83f43f0cd6bbd82b4e" args="(bool Loop)" --> @@ -379,7 +478,7 @@ Reimplemented from <a class="el" href="classsf_1_1Sound.htm#02e2b7593110f61eeb7c <td class="paramtype">bool </td> <td class="paramname"> <em>Loop</em> </td> <td> ) </td> - <td width="100%"><code> [inherited]</code></td> + <td><code> [inherited]</code></td> </tr> </table> </div> @@ -388,6 +487,7 @@ Reimplemented from <a class="el" href="classsf_1_1Sound.htm#02e2b7593110f61eeb7c <p> Set the stream loop state. <p> +Set the music loop state.<p> This parameter is disabled by default<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> @@ -395,73 +495,40 @@ This parameter is disabled by default<p> </table> </dl> -<p> -Reimplemented from <a class="el" href="classsf_1_1Sound.htm#4eb9966b7289c69623a39cc0125012f4">sf::Sound</a>. +<p>Reimplemented from <a class="el" href="classsf_1_1Sound.htm#4eb9966b7289c69623a39cc0125012f4">sf::Sound</a>.</p> + +<p>Definition at line <a class="el" href="SoundStream_8cpp-source.htm#l00171">171</a> of file <a class="el" href="SoundStream_8cpp-source.htm">SoundStream.cpp</a>.</p> + </div> </div><p> -<a class="anchor" name="8f5f5aaba5aebc45fc008e952c0ae530"></a><!-- doxytag: member="sf::Music::GetLoop" ref="8f5f5aaba5aebc45fc008e952c0ae530" args="() const" --> +<a class="anchor" name="53c9e9b160bcbcc89c93c1682b4525df"></a><!-- doxytag: member="sf::Music::Stop" ref="53c9e9b160bcbcc89c93c1682b4525df" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> - <td class="memname">bool sf::SoundStream::GetLoop </td> + <td class="memname">void sf::SoundStream::Stop </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> - <td width="100%"> const<code> [inherited]</code></td> + <td><code> [inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p> -Tell whether or not the stream is looping. +Stop playing the audio stream. <p> -<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if the music is looping, false otherwise </dd></dl> -<p> -Reimplemented from <a class="el" href="classsf_1_1Sound.htm#225e8dab6b148652304ed1874b6b19a3">sf::Sound</a>. -</div> -</div><p> -<a class="anchor" name="ed9b6b06c0fa9c2d0b8c094eb2826793"></a><!-- doxytag: member="sf::Music::Initialize" ref="ed9b6b06c0fa9c2d0b8c094eb2826793" args="(unsigned int ChannelsCount, unsigned int SampleRate)" --> -<div class="memitem"> -<div class="memproto"> - <table class="memname"> - <tr> - <td class="memname">void sf::SoundStream::Initialize </td> - <td>(</td> - <td class="paramtype">unsigned int </td> - <td class="paramname"> <em>ChannelsCount</em>, </td> - </tr> - <tr> - <td class="paramkey"></td> - <td></td> - <td class="paramtype">unsigned int </td> - <td class="paramname"> <em>SampleRate</em></td><td> </td> - </tr> - <tr> - <td></td> - <td>)</td> - <td></td><td></td><td width="100%"><code> [protected, inherited]</code></td> - </tr> - </table> -</div> -<div class="memdoc"> +<p>Reimplemented from <a class="el" href="classsf_1_1Sound.htm#b1f5f103f737c52ceb0b1a067b4d0630">sf::Sound</a>.</p> -<p> -Set the audio stream parameters, you must call it before <a class="el" href="classsf_1_1SoundStream.htm#4d8437ef9a952fe3798bd239ff20d9bf" title="Start playing the audio stream.">Play()</a>. -<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>ChannelsCount</em> </td><td>: Number of channels </td></tr> - <tr><td valign="top"></td><td valign="top"><em>SampleRate</em> </td><td>: Sample rate </td></tr> - </table> -</dl> +<p>Definition at line <a class="el" href="SoundStream_8cpp-source.htm#l00115">115</a> of file <a class="el" href="SoundStream_8cpp-source.htm">SoundStream.cpp</a>.</p> </div> </div><p> -<hr>The documentation for this class was generated from the following file:<ul> -<li><a class="el" href="Music_8hpp-source.htm">Music.hpp</a></ul> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="Music_8hpp-source.htm">Music.hpp</a><li><a class="el" href="Music_8cpp-source.htm">Music.cpp</a></ul> +</div> <p id="footer"> :: Copyright © 2007-2008 Laurent Gomila, all rights reserved :: |