summaryrefslogtreecommitdiff
path: root/doc/html/classsf_1_1SoundBuffer.htm
blob: 26593637ce98f95251495698298bac694dfe68d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
<!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.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="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>
<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>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundBuffer.htm#0cabfbfe19b831bf7d5c9592d92ef233">SoundBuffer</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor.  <a href="#0cabfbfe19b831bf7d5c9592d92ef233"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundBuffer.htm#deb60002d4c4a4d8511fb5aa7225224b">SoundBuffer</a> (const <a class="el" href="classsf_1_1SoundBuffer.htm">SoundBuffer</a> &amp;Copy)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy constructor.  <a href="#deb60002d4c4a4d8511fb5aa7225224b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundBuffer.htm#ea240161724ffba74a0d6a9e277d3cd5">~SoundBuffer</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#ea240161724ffba74a0d6a9e277d3cd5"></a><br></td></tr>
<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#232bb58d0910729a542cc2af473c8aa4">LoadFromFile</a> (const std::string &amp;Filename)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Load the sound buffer from a file.  <a href="#232bb58d0910729a542cc2af473c8aa4"></a><br></td></tr>
<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#694c43f4ee7b2c6277c1ead496d266f3">LoadFromMemory</a> (const char *Data, std::size_t SizeInBytes)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Load the sound buffer from a file in memory.  <a href="#694c43f4ee7b2c6277c1ead496d266f3"></a><br></td></tr>
<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#5efd0d42e07a4c7841b6d4f30849d7dc">LoadFromSamples</a> (const Int16 *Samples, std::size_t SamplesCount, unsigned int ChannelsCount, unsigned int SampleRate)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Load the sound buffer from an array of samples - assumed format for samples is 16 bits signed integer.  <a href="#5efd0d42e07a4c7841b6d4f30849d7dc"></a><br></td></tr>
<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#26b7f93c9d02c34545ff3f1b37206fe0">GetSamples</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="#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="#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="#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="#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="#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"><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>Definition at line <a class="el" href="SoundBuffer_8hpp-source.htm#l00046">46</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">
      <table class="memname">
        <tr>
          <td class="memname">sf::SoundBuffer::SoundBuffer           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Default constructor. 
<p>

<p>Definition at line <a class="el" href="SoundBuffer_8cpp-source.htm#l00042">42</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)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sf::SoundBuffer::SoundBuffer           </td>
          <td>(</td>
          <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></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Copy constructor. 
<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>Copy</em>&nbsp;</td><td>: Instance to copy </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="SoundBuffer_8cpp-source.htm#l00054">54</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="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sf::SoundBuffer::~SoundBuffer           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destructor. 
<p>

<p>Definition at line <a class="el" href="SoundBuffer_8cpp-source.htm#l00073">73</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="cfea4667cb8a5e72b1061fa2647af30f"></a><!-- doxytag: member="sf::SoundBuffer::GetChannelsCount" ref="cfea4667cb8a5e72b1061fa2647af30f" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int sf::SoundBuffer::GetChannelsCount           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the number of channels (1 = mono, 2 = stereo, . 
<p>
..)<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#l00253">253</a> of file <a class="el" href="SoundBuffer_8cpp-source.htm">SoundBuffer.cpp</a>.</p>

</div>
</div><p>
<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">float sf::SoundBuffer::GetDuration           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the sound duration. 
<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>

<p>Definition at line <a class="el" href="SoundBuffer_8cpp-source.htm#l00265">265</a> of file <a class="el" href="SoundBuffer_8cpp-source.htm">SoundBuffer.cpp</a>.</p>

</div>
</div><p>
<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">unsigned int sf::SoundBuffer::GetSampleRate           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the sample rate. 
<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>

<p>Definition at line <a class="el" href="SoundBuffer_8cpp-source.htm#l00241">241</a> of file <a class="el" href="SoundBuffer_8cpp-source.htm">SoundBuffer.cpp</a>.</p>

</div>
</div><p>
<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">const Int16 * sf::SoundBuffer::GetSamples           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the sound samples. 
<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>

<p>Definition at line <a class="el" href="SoundBuffer_8cpp-source.htm#l00223">223</a> of file <a class="el" href="SoundBuffer_8cpp-source.htm">SoundBuffer.cpp</a>.</p>

</div>
</div><p>
<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">std::size_t sf::SoundBuffer::GetSamplesCount           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the samples count. 
<p>
<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#l00232">232</a> of file <a class="el" href="SoundBuffer_8cpp-source.htm">SoundBuffer.cpp</a>.</p>

</div>
</div><p>
<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">bool sf::SoundBuffer::LoadFromFile           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>Filename</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Load the sound buffer from 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>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#l00088">88</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)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool sf::SoundBuffer::LoadFromMemory           </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></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Load the sound buffer from a file in memory. 
<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>

<p>Definition at line <a class="el" href="SoundBuffer_8cpp-source.htm#l00129">129</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)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool sf::SoundBuffer::LoadFromSamples           </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></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. 
<p>
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#l00171">171</a> of file <a class="el" href="SoundBuffer_8cpp-source.htm">SoundBuffer.cpp</a>.</p>

</div>
</div><p>
<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"><a class="el" href="classsf_1_1SoundBuffer.htm">SoundBuffer</a> &amp; sf::SoundBuffer::operator=           </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>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Assignment operator. 
<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>
  </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#l00274">274</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 " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool sf::SoundBuffer::SaveToFile           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>Filename</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
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>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>

<p>Definition at line <a class="el" href="SoundBuffer_8cpp-source.htm#l00199">199</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 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;
            Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen 1.5.2</a> &nbsp;::&nbsp;
        </p>

    </body>
</html>