summaryrefslogtreecommitdiff
path: root/doc/html/classsf_1_1SoundBuffer.htm
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/classsf_1_1SoundBuffer.htm')
-rwxr-xr-xdoc/html/classsf_1_1SoundBuffer.htm367
1 files changed, 201 insertions, 166 deletions
diff --git a/doc/html/classsf_1_1SoundBuffer.htm b/doc/html/classsf_1_1SoundBuffer.htm
index e67e098..bf1b85b 100755
--- a/doc/html/classsf_1_1SoundBuffer.htm
+++ b/doc/html/classsf_1_1SoundBuffer.htm
@@ -10,36 +10,45 @@
<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 class="current"><a href="classes.htm"><span>Classes</span></a></li>
- <li><a href="files.htm"><span>Files</span></a></li>
- </ul>
+<!-- Generated by Doxygen 1.5.8 -->
+<div class="navigation" id="top">
+ <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 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&nbsp;List</span></a></li>
+ <li><a href="classes.htm"><span>Class&nbsp;Index</span></a></li>
+ <li><a href="hierarchy.htm"><span>Class&nbsp;Hierarchy</span></a></li>
+ <li><a href="functions.htm"><span>Class&nbsp;Members</span></a></li>
+ </ul>
+ </div>
+ <div class="navpath"><b>sf</b>::<a class="el" href="classsf_1_1SoundBuffer.htm">SoundBuffer</a>
+ </div>
</div>
-<div class="tabs">
- <ul>
- <li><a href="classes.htm"><span>Alphabetical&nbsp;List</span></a></li>
- <li><a href="annotated.htm"><span>Class&nbsp;List</span></a></li>
- <li><a href="hierarchy.htm"><span>Class&nbsp;Hierarchy</span></a></li>
- <li><a href="functions.htm"><span>Class&nbsp;Members</span></a></li>
- </ul>
-</div>
-<div class="nav">
-<a class="el" href="namespacesf.htm">sf</a>::<a class="el" href="classsf_1_1SoundBuffer.htm">SoundBuffer</a></div>
-<h1>sf::SoundBuffer Class Reference</h1><!-- doxytag: class="sf::SoundBuffer" --><!-- doxytag: inherits="sf::AudioResource,sf::Resource&lt; SoundBuffer &gt;" --><a class="el" href="classsf_1_1SoundBuffer.htm" title="SoundBuffer is the low-level for loading and manipulating sound buffers.">SoundBuffer</a> is the low-level for loading and manipulating sound buffers.
+<div class="contents">
+<h1>sf::SoundBuffer Class Reference</h1><!-- doxytag: class="sf::SoundBuffer" --><!-- doxytag: inherits="sf::AudioResource,Resource&lt; SoundBuffer &gt;" --><a class="el" href="classsf_1_1SoundBuffer.htm" title="SoundBuffer is the low-level for loading and manipulating sound buffers.">SoundBuffer</a> is the low-level for loading and manipulating sound buffers.
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="SoundBuffer_8hpp-source.htm">SoundBuffer.hpp</a>&gt;</code>
<p>
-<p>Inheritance diagram for sf::SoundBuffer:
+<div class="dynheader">
+Inheritance diagram for sf::SoundBuffer:</div>
+<div class="dynsection">
+
<p><center><img src="classsf_1_1SoundBuffer.png" usemap="#sf::SoundBuffer_map" border="0" alt=""></center>
<map name="sf::SoundBuffer_map">
<area href="classsf_1_1AudioResource.htm" alt="sf::AudioResource" shape="rect" coords="0,0,177,24">
<area href="classsf_1_1Resource.htm" alt="sf::Resource< SoundBuffer >" shape="rect" coords="187,0,364,24">
</map>
+</div>
+
+<p>
<a href="classsf_1_1SoundBuffer-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 Member Functions</h2></td></tr>
@@ -64,35 +73,33 @@
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundBuffer.htm#f4515a797138382cf98a4d9cd5047239">SaveToFile</a> (const std::string &amp;Filename) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Save the sound buffer to a file. <a href="#f4515a797138382cf98a4d9cd5047239"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">const Int16 *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundBuffer.htm#20f9d64994787389968214fdd2cb4ddf">GetSamples</a> () const</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">const Int16 *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundBuffer.htm#26b7f93c9d02c34545ff3f1b37206fe0">GetSamples</a> () const </td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the sound samples. <a href="#20f9d64994787389968214fdd2cb4ddf"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">std::size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundBuffer.htm#9fb77c0cebce5496901f3d49ab2cd59d">GetSamplesCount</a> () const</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the sound samples. <a href="#26b7f93c9d02c34545ff3f1b37206fe0"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">std::size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundBuffer.htm#5da93e162669ec8c03b902f622261789">GetSamplesCount</a> () const </td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the samples count. <a href="#9fb77c0cebce5496901f3d49ab2cd59d"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundBuffer.htm#41f4a2e7d9a8c2fbee7e4d9ce58e8d6d">GetSampleRate</a> () const</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the samples count. <a href="#5da93e162669ec8c03b902f622261789"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundBuffer.htm#c4b1b885e3720689c6cbc22ff6cbe571">GetSampleRate</a> () const </td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the sample rate. <a href="#41f4a2e7d9a8c2fbee7e4d9ce58e8d6d"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundBuffer.htm#fe1650c810fbf332e0ae97e8783ec0e8">GetChannelsCount</a> () const</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the sample rate. <a href="#c4b1b885e3720689c6cbc22ff6cbe571"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundBuffer.htm#cfea4667cb8a5e72b1061fa2647af30f">GetChannelsCount</a> () const </td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the number of channels (1 = mono, 2 = stereo, . <a href="#fe1650c810fbf332e0ae97e8783ec0e8"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundBuffer.htm#f3f1dac324342481947b1bf129c38175">GetDuration</a> () const</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the number of channels (1 = mono, 2 = stereo, . <a href="#cfea4667cb8a5e72b1061fa2647af30f"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundBuffer.htm#525731db309fb7d5b9781e65bc4e0984">GetDuration</a> () const </td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the sound duration. <a href="#f3f1dac324342481947b1bf129c38175"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classsf_1_1SoundBuffer.htm">SoundBuffer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundBuffer.htm#71326b777a73a40aecc52403cd2932da">operator=</a> (const <a class="el" href="classsf_1_1SoundBuffer.htm">SoundBuffer</a> &amp;Other)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the sound duration. <a href="#525731db309fb7d5b9781e65bc4e0984"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classsf_1_1SoundBuffer.htm">SoundBuffer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundBuffer.htm#cfdc7a2357c06e2e15c408a4fa21bd49">operator=</a> (const <a class="el" href="classsf_1_1SoundBuffer.htm">SoundBuffer</a> &amp;Other)</td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Assignment operator. <a href="#71326b777a73a40aecc52403cd2932da"></a><br></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Assignment operator. <a href="#cfdc7a2357c06e2e15c408a4fa21bd49"></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="50914f77c7cf4fb97616c898c5291f4b"></a><!-- doxytag: member="sf::SoundBuffer::Sound" ref="50914f77c7cf4fb97616c898c5291f4b" args="" -->
-class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundBuffer.htm#50914f77c7cf4fb97616c898c5291f4b">Sound</a></td></tr>
+class&nbsp;</td><td class="memItemRight" valign="bottom"><b>Sound</b></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<a class="el" href="classsf_1_1SoundBuffer.htm" title="SoundBuffer is the low-level for loading and manipulating sound buffers.">SoundBuffer</a> is the low-level for loading and manipulating sound buffers.
-<p>
-
-<p>
-Definition at line <a class="el" href="SoundBuffer_8hpp-source.htm#l00043">43</a> of file <a class="el" href="SoundBuffer_8hpp-source.htm">SoundBuffer.hpp</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<p>Definition at line <a class="el" href="SoundBuffer_8hpp-source.htm#l00043">43</a> of file <a class="el" href="SoundBuffer_8hpp-source.htm">SoundBuffer.hpp</a>.</p>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="0cabfbfe19b831bf7d5c9592d92ef233"></a><!-- doxytag: member="sf::SoundBuffer::SoundBuffer" ref="0cabfbfe19b831bf7d5c9592d92ef233" args="()" -->
<div class="memitem">
<div class="memproto">
@@ -102,7 +109,7 @@ Definition at line <a class="el" href="SoundBuffer_8hpp-source.htm#l00043">43</a
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
- <td width="100%"></td>
+ <td></td>
</tr>
</table>
</div>
@@ -112,6 +119,8 @@ Definition at line <a class="el" href="SoundBuffer_8hpp-source.htm#l00043">43</a
Default constructor.
<p>
+<p>Definition at line <a class="el" href="SoundBuffer_8cpp-source.htm#l00041">41</a> of file <a class="el" href="SoundBuffer_8cpp-source.htm">SoundBuffer.cpp</a>.</p>
+
</div>
</div><p>
<a class="anchor" name="deb60002d4c4a4d8511fb5aa7225224b"></a><!-- doxytag: member="sf::SoundBuffer::SoundBuffer" ref="deb60002d4c4a4d8511fb5aa7225224b" args="(const SoundBuffer &amp;Copy)" -->
@@ -124,7 +133,7 @@ Default constructor.
<td class="paramtype">const <a class="el" href="classsf_1_1SoundBuffer.htm">SoundBuffer</a> &amp;&nbsp;</td>
<td class="paramname"> <em>Copy</em> </td>
<td>&nbsp;)&nbsp;</td>
- <td width="100%"></td>
+ <td></td>
</tr>
</table>
</div>
@@ -139,6 +148,8 @@ Copy constructor.
</table>
</dl>
+<p>Definition at line <a class="el" href="SoundBuffer_8cpp-source.htm#l00053">53</a> of file <a class="el" href="SoundBuffer_8cpp-source.htm">SoundBuffer.cpp</a>.</p>
+
</div>
</div><p>
<a class="anchor" name="ea240161724ffba74a0d6a9e277d3cd5"></a><!-- doxytag: member="sf::SoundBuffer::~SoundBuffer" ref="ea240161724ffba74a0d6a9e277d3cd5" args="()" -->
@@ -150,7 +161,7 @@ Copy constructor.
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
- <td width="100%"></td>
+ <td></td>
</tr>
</table>
</div>
@@ -160,296 +171,320 @@ Copy constructor.
Destructor.
<p>
+<p>Definition at line <a class="el" href="SoundBuffer_8cpp-source.htm#l00071">71</a> of file <a class="el" href="SoundBuffer_8cpp-source.htm">SoundBuffer.cpp</a>.</p>
+
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="232bb58d0910729a542cc2af473c8aa4"></a><!-- doxytag: member="sf::SoundBuffer::LoadFromFile" ref="232bb58d0910729a542cc2af473c8aa4" args="(const std::string &amp;Filename)" -->
+<a class="anchor" name="cfea4667cb8a5e72b1061fa2647af30f"></a><!-- doxytag: member="sf::SoundBuffer::GetChannelsCount" ref="cfea4667cb8a5e72b1061fa2647af30f" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
- <td class="memname">bool sf::SoundBuffer::LoadFromFile </td>
+ <td class="memname">unsigned int sf::SoundBuffer::GetChannelsCount </td>
<td>(</td>
- <td class="paramtype">const std::string &amp;&nbsp;</td>
- <td class="paramname"> <em>Filename</em> </td>
+ <td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
- <td width="100%"></td>
+ <td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
-Load the sound buffer from a file.
+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>&nbsp;</td><td>: Path of the sound file to load</td></tr>
- </table>
-</dl>
-<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if loading has been successful </dd></dl>
+..)<p>
+<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of channels</dd></dl>
+..)
+<p>Definition at line <a class="el" href="SoundBuffer_8cpp-source.htm#l00246">246</a> of file <a class="el" href="SoundBuffer_8cpp-source.htm">SoundBuffer.cpp</a>.</p>
</div>
</div><p>
-<a class="anchor" name="694c43f4ee7b2c6277c1ead496d266f3"></a><!-- doxytag: member="sf::SoundBuffer::LoadFromMemory" ref="694c43f4ee7b2c6277c1ead496d266f3" args="(const char *Data, std::size_t SizeInBytes)" -->
+<a class="anchor" name="525731db309fb7d5b9781e65bc4e0984"></a><!-- doxytag: member="sf::SoundBuffer::GetDuration" ref="525731db309fb7d5b9781e65bc4e0984" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
- <td class="memname">bool sf::SoundBuffer::LoadFromMemory </td>
+ <td class="memname">float sf::SoundBuffer::GetDuration </td>
<td>(</td>
- <td class="paramtype">const char *&nbsp;</td>
- <td class="paramname"> <em>Data</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">std::size_t&nbsp;</td>
- <td class="paramname"> <em>SizeInBytes</em></td><td>&nbsp;</td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td width="100%"></td>
+ <td class="paramname"> </td>
+ <td>&nbsp;)&nbsp;</td>
+ <td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
-Load the sound buffer from a file in memory.
+Get the sound 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>&nbsp;</td><td>: Pointer to the file data in memory </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>SizeInBytes</em>&nbsp;</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>
+<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> duration, in seconds </dd></dl>
+
+<p>Definition at line <a class="el" href="SoundBuffer_8cpp-source.htm#l00258">258</a> of file <a class="el" href="SoundBuffer_8cpp-source.htm">SoundBuffer.cpp</a>.</p>
</div>
</div><p>
-<a class="anchor" name="5efd0d42e07a4c7841b6d4f30849d7dc"></a><!-- doxytag: member="sf::SoundBuffer::LoadFromSamples" ref="5efd0d42e07a4c7841b6d4f30849d7dc" args="(const Int16 *Samples, std::size_t SamplesCount, unsigned int ChannelsCount, unsigned int SampleRate)" -->
+<a class="anchor" name="c4b1b885e3720689c6cbc22ff6cbe571"></a><!-- doxytag: member="sf::SoundBuffer::GetSampleRate" ref="c4b1b885e3720689c6cbc22ff6cbe571" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
- <td class="memname">bool sf::SoundBuffer::LoadFromSamples </td>
+ <td class="memname">unsigned int sf::SoundBuffer::GetSampleRate </td>
<td>(</td>
- <td class="paramtype">const Int16 *&nbsp;</td>
- <td class="paramname"> <em>Samples</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">std::size_t&nbsp;</td>
- <td class="paramname"> <em>SamplesCount</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">unsigned int&nbsp;</td>
- <td class="paramname"> <em>ChannelsCount</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">unsigned int&nbsp;</td>
- <td class="paramname"> <em>SampleRate</em></td><td>&nbsp;</td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td width="100%"></td>
+ <td class="paramname"> </td>
+ <td>&nbsp;)&nbsp;</td>
+ <td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
-Load the sound buffer from an array of samples - assumed format for samples is 16 bits signed integer.
+Get the sample rate.
<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>Samples</em>&nbsp;</td><td>: Pointer to the samples in memory </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>SamplesCount</em>&nbsp;</td><td>: Number of samples pointed by Samples </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>ChannelsCount</em>&nbsp;</td><td>: Number of channels (1 = mono, 2 = stereo, ...) </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>SampleRate</em>&nbsp;</td><td>: Frequency (number of samples to play per second)</td></tr>
- </table>
-</dl>
-<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if loading has been successful </dd></dl>
+<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> frequency (number of samples per second) </dd></dl>
+
+<p>Definition at line <a class="el" href="SoundBuffer_8cpp-source.htm#l00234">234</a> of file <a class="el" href="SoundBuffer_8cpp-source.htm">SoundBuffer.cpp</a>.</p>
</div>
</div><p>
-<a class="anchor" name="f4515a797138382cf98a4d9cd5047239"></a><!-- doxytag: member="sf::SoundBuffer::SaveToFile" ref="f4515a797138382cf98a4d9cd5047239" args="(const std::string &amp;Filename) const " -->
+<a class="anchor" name="26b7f93c9d02c34545ff3f1b37206fe0"></a><!-- doxytag: member="sf::SoundBuffer::GetSamples" ref="26b7f93c9d02c34545ff3f1b37206fe0" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
- <td class="memname">bool sf::SoundBuffer::SaveToFile </td>
+ <td class="memname">const Int16 * sf::SoundBuffer::GetSamples </td>
<td>(</td>
- <td class="paramtype">const std::string &amp;&nbsp;</td>
- <td class="paramname"> <em>Filename</em> </td>
+ <td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
- <td width="100%"> const</td>
+ <td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
-Save the sound buffer to a file.
+Return the sound samples.
<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>&nbsp;</td><td>: Path of the sound file to write</td></tr>
- </table>
-</dl>
-<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if saving has been successful </dd></dl>
+<dl class="return" compact><dt><b>Returns:</b></dt><dd>Pointer to the array of sound samples, in 16 bits signed integer format </dd></dl>
+
+<p>Definition at line <a class="el" href="SoundBuffer_8cpp-source.htm#l00216">216</a> of file <a class="el" href="SoundBuffer_8cpp-source.htm">SoundBuffer.cpp</a>.</p>
</div>
</div><p>
-<a class="anchor" name="20f9d64994787389968214fdd2cb4ddf"></a><!-- doxytag: member="sf::SoundBuffer::GetSamples" ref="20f9d64994787389968214fdd2cb4ddf" args="() const" -->
+<a class="anchor" name="5da93e162669ec8c03b902f622261789"></a><!-- doxytag: member="sf::SoundBuffer::GetSamplesCount" ref="5da93e162669ec8c03b902f622261789" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
- <td class="memname">const Int16* sf::SoundBuffer::GetSamples </td>
+ <td class="memname">std::size_t sf::SoundBuffer::GetSamplesCount </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
- <td width="100%"> const</td>
+ <td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
-Return the sound samples.
+Return the samples count.
<p>
-<dl class="return" compact><dt><b>Returns:</b></dt><dd>Pointer to the array of sound samples, in 16 bits signed integer format </dd></dl>
+<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of samples </dd></dl>
+
+<p>Definition at line <a class="el" href="SoundBuffer_8cpp-source.htm#l00225">225</a> of file <a class="el" href="SoundBuffer_8cpp-source.htm">SoundBuffer.cpp</a>.</p>
</div>
</div><p>
-<a class="anchor" name="9fb77c0cebce5496901f3d49ab2cd59d"></a><!-- doxytag: member="sf::SoundBuffer::GetSamplesCount" ref="9fb77c0cebce5496901f3d49ab2cd59d" args="() const" -->
+<a class="anchor" name="232bb58d0910729a542cc2af473c8aa4"></a><!-- doxytag: member="sf::SoundBuffer::LoadFromFile" ref="232bb58d0910729a542cc2af473c8aa4" args="(const std::string &amp;Filename)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
- <td class="memname">std::size_t sf::SoundBuffer::GetSamplesCount </td>
+ <td class="memname">bool sf::SoundBuffer::LoadFromFile </td>
<td>(</td>
- <td class="paramname"> </td>
+ <td class="paramtype">const std::string &amp;&nbsp;</td>
+ <td class="paramname"> <em>Filename</em> </td>
<td>&nbsp;)&nbsp;</td>
- <td width="100%"> const</td>
+ <td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
-Return the samples count.
+Load the sound buffer from a file.
<p>
-<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of samples </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>&nbsp;</td><td>: Path of the sound file to load</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="SoundBuffer_8cpp-source.htm#l00081">81</a> of file <a class="el" href="SoundBuffer_8cpp-source.htm">SoundBuffer.cpp</a>.</p>
</div>
</div><p>
-<a class="anchor" name="41f4a2e7d9a8c2fbee7e4d9ce58e8d6d"></a><!-- doxytag: member="sf::SoundBuffer::GetSampleRate" ref="41f4a2e7d9a8c2fbee7e4d9ce58e8d6d" args="() const" -->
+<a class="anchor" name="694c43f4ee7b2c6277c1ead496d266f3"></a><!-- doxytag: member="sf::SoundBuffer::LoadFromMemory" ref="694c43f4ee7b2c6277c1ead496d266f3" args="(const char *Data, std::size_t SizeInBytes)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
- <td class="memname">unsigned int sf::SoundBuffer::GetSampleRate </td>
+ <td class="memname">bool sf::SoundBuffer::LoadFromMemory </td>
<td>(</td>
- <td class="paramname"> </td>
- <td>&nbsp;)&nbsp;</td>
- <td width="100%"> const</td>
+ <td class="paramtype">const char *&nbsp;</td>
+ <td class="paramname"> <em>Data</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">std::size_t&nbsp;</td>
+ <td class="paramname"> <em>SizeInBytes</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
-Get the sample rate.
+Load the sound buffer from a file in memory.
<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> 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>Data</em>&nbsp;</td><td>: Pointer to the file data in memory </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>SizeInBytes</em>&nbsp;</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="SoundBuffer_8cpp-source.htm#l00122">122</a> of file <a class="el" href="SoundBuffer_8cpp-source.htm">SoundBuffer.cpp</a>.</p>
</div>
</div><p>
-<a class="anchor" name="fe1650c810fbf332e0ae97e8783ec0e8"></a><!-- doxytag: member="sf::SoundBuffer::GetChannelsCount" ref="fe1650c810fbf332e0ae97e8783ec0e8" args="() const" -->
+<a class="anchor" name="5efd0d42e07a4c7841b6d4f30849d7dc"></a><!-- doxytag: member="sf::SoundBuffer::LoadFromSamples" ref="5efd0d42e07a4c7841b6d4f30849d7dc" args="(const Int16 *Samples, std::size_t SamplesCount, unsigned int ChannelsCount, unsigned int SampleRate)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
- <td class="memname">unsigned int sf::SoundBuffer::GetChannelsCount </td>
+ <td class="memname">bool sf::SoundBuffer::LoadFromSamples </td>
<td>(</td>
- <td class="paramname"> </td>
- <td>&nbsp;)&nbsp;</td>
- <td width="100%"> const</td>
+ <td class="paramtype">const Int16 *&nbsp;</td>
+ <td class="paramname"> <em>Samples</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">std::size_t&nbsp;</td>
+ <td class="paramname"> <em>SamplesCount</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">unsigned int&nbsp;</td>
+ <td class="paramname"> <em>ChannelsCount</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">unsigned int&nbsp;</td>
+ <td class="paramname"> <em>SampleRate</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
-Return the number of channels (1 = mono, 2 = stereo, .
+Load the sound buffer from an array of samples - assumed format for samples is 16 bits signed integer.
<p>
-..)<p>
-<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of channels </dd></dl>
+Load the sound buffer from an array of samples - assumed format for samples is 16 bits signed integer.<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>Samples</em>&nbsp;</td><td>: Pointer to the samples in memory </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>SamplesCount</em>&nbsp;</td><td>: Number of samples pointed by Samples </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>ChannelsCount</em>&nbsp;</td><td>: Number of channels (1 = mono, 2 = stereo, ...) </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>SampleRate</em>&nbsp;</td><td>: Frequency (number of samples to play per second)</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="SoundBuffer_8cpp-source.htm#l00164">164</a> of file <a class="el" href="SoundBuffer_8cpp-source.htm">SoundBuffer.cpp</a>.</p>
</div>
</div><p>
-<a class="anchor" name="f3f1dac324342481947b1bf129c38175"></a><!-- doxytag: member="sf::SoundBuffer::GetDuration" ref="f3f1dac324342481947b1bf129c38175" args="() const" -->
+<a class="anchor" name="cfdc7a2357c06e2e15c408a4fa21bd49"></a><!-- doxytag: member="sf::SoundBuffer::operator=" ref="cfdc7a2357c06e2e15c408a4fa21bd49" args="(const SoundBuffer &amp;Other)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
- <td class="memname">float sf::SoundBuffer::GetDuration </td>
+ <td class="memname"><a class="el" href="classsf_1_1SoundBuffer.htm">SoundBuffer</a> &amp; sf::SoundBuffer::operator= </td>
<td>(</td>
- <td class="paramname"> </td>
+ <td class="paramtype">const <a class="el" href="classsf_1_1SoundBuffer.htm">SoundBuffer</a> &amp;&nbsp;</td>
+ <td class="paramname"> <em>Other</em> </td>
<td>&nbsp;)&nbsp;</td>
- <td width="100%"> const</td>
+ <td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
-Get the sound duration.
+Assignment operator.
<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> duration, in seconds </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>Other</em>&nbsp;</td><td>: Instance to assign</td></tr>
+ </table>
+</dl>
+<dl class="return" compact><dt><b>Returns:</b></dt><dd>Reference to the sound buffer </dd></dl>
+
+<p>Definition at line <a class="el" href="SoundBuffer_8cpp-source.htm#l00267">267</a> of file <a class="el" href="SoundBuffer_8cpp-source.htm">SoundBuffer.cpp</a>.</p>
</div>
</div><p>
-<a class="anchor" name="71326b777a73a40aecc52403cd2932da"></a><!-- doxytag: member="sf::SoundBuffer::operator=" ref="71326b777a73a40aecc52403cd2932da" args="(const SoundBuffer &amp;Other)" -->
+<a class="anchor" name="f4515a797138382cf98a4d9cd5047239"></a><!-- doxytag: member="sf::SoundBuffer::SaveToFile" ref="f4515a797138382cf98a4d9cd5047239" args="(const std::string &amp;Filename) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
- <td class="memname"><a class="el" href="classsf_1_1SoundBuffer.htm">SoundBuffer</a>&amp; sf::SoundBuffer::operator= </td>
+ <td class="memname">bool sf::SoundBuffer::SaveToFile </td>
<td>(</td>
- <td class="paramtype">const <a class="el" href="classsf_1_1SoundBuffer.htm">SoundBuffer</a> &amp;&nbsp;</td>
- <td class="paramname"> <em>Other</em> </td>
+ <td class="paramtype">const std::string &amp;&nbsp;</td>
+ <td class="paramname"> <em>Filename</em> </td>
<td>&nbsp;)&nbsp;</td>
- <td width="100%"></td>
+ <td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
-Assignment operator.
+Save the sound buffer to a file.
<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>&nbsp;</td><td>: Instance to assign</td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>Filename</em>&nbsp;</td><td>: Path of the sound file to write</td></tr>
</table>
</dl>
-<dl class="return" compact><dt><b>Returns:</b></dt><dd>Reference to the sound buffer </dd></dl>
+<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if saving has been successful </dd></dl>
+
+<p>Definition at line <a class="el" href="SoundBuffer_8cpp-source.htm#l00192">192</a> of file <a class="el" href="SoundBuffer_8cpp-source.htm">SoundBuffer.cpp</a>.</p>
</div>
</div><p>
-<hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="SoundBuffer_8hpp-source.htm">SoundBuffer.hpp</a></ul>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="SoundBuffer_8hpp-source.htm">SoundBuffer.hpp</a><li><a class="el" href="SoundBuffer_8cpp-source.htm">SoundBuffer.cpp</a></ul>
+</div>
<p id="footer">
&nbsp;::&nbsp; Copyright &copy; 2007-2008 Laurent Gomila, all rights reserved &nbsp;::&nbsp;