summaryrefslogtreecommitdiff
path: root/libghack/CSFML-2.1-windows-64bits/CSFML-2.1/doc/html/SoundBuffer_8h.htm
blob: 368b3ddaebd5613787e13d32d175dafef25b6eb0 (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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>CSFML - C binding of the Simple and Fast Multimedia Library</title>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
        <!--<link rel='stylesheet' type='text/css' href="http://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
        <link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" />
    </head>
    <body>
        <div id="banner-container">
            <div id="banner">
                <span id="sfml">CSFML</span>
            </div>
        </div>
        <div id="content">
<!-- Generated by Doxygen 1.8.2 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.htm"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.htm"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.htm"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.htm"><span>File&#160;List</span></a></li>
      <li><a href="globals.htm"><span>Globals</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_6a66b7969672f1da69f458a57d2c97f9.htm">include</a></li><li class="navelem"><a class="el" href="dir_8cc999c03ab8fdf40558b1f21f869c3e.htm">SFML</a></li><li class="navelem"><a class="el" href="dir_ab65b93e3e53c8b4552e87dc0e7cef27.htm">Audio</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">SoundBuffer.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="Audio_2Export_8h_source.htm">SFML/Audio/Export.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="Audio_2Types_8h_source.htm">SFML/Audio/Types.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="InputStream_8h_source.htm">SFML/System/InputStream.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="Time_8h_source.htm">SFML/System/Time.h</a>&gt;</code><br/>
<code>#include &lt;stddef.h&gt;</code><br/>
</div>
<p><a href="SoundBuffer_8h_source.htm">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:afd79a633db98cd67412c2090e27eda2f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SoundBuffer_8h.htm#afd79a633db98cd67412c2090e27eda2f">sfSoundBuffer_createFromFile</a> (const char *filename)</td></tr>
<tr class="memdesc:afd79a633db98cd67412c2090e27eda2f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new sound buffer and load it from a file.  <a href="#afd79a633db98cd67412c2090e27eda2f"></a><br/></td></tr>
<tr class="separator:afd79a633db98cd67412c2090e27eda2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5619dc26f92b49ad849a31c076c19cb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SoundBuffer_8h.htm#ab5619dc26f92b49ad849a31c076c19cb">sfSoundBuffer_createFromMemory</a> (const void *data, size_t sizeInBytes)</td></tr>
<tr class="memdesc:ab5619dc26f92b49ad849a31c076c19cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new sound buffer and load it from a file in memory.  <a href="#ab5619dc26f92b49ad849a31c076c19cb"></a><br/></td></tr>
<tr class="separator:ab5619dc26f92b49ad849a31c076c19cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabe469481de03c1105a6a1795d350d35"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SoundBuffer_8h.htm#aabe469481de03c1105a6a1795d350d35">sfSoundBuffer_createFromStream</a> (<a class="el" href="structsfInputStream.htm">sfInputStream</a> *stream)</td></tr>
<tr class="memdesc:aabe469481de03c1105a6a1795d350d35"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new sound buffer and load it from a custom stream.  <a href="#aabe469481de03c1105a6a1795d350d35"></a><br/></td></tr>
<tr class="separator:aabe469481de03c1105a6a1795d350d35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a194ce902c71f4303444abfc50ddf847e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SoundBuffer_8h.htm#a194ce902c71f4303444abfc50ddf847e">sfSoundBuffer_createFromSamples</a> (const <a class="el" href="Config_8h.htm#a41552dc8bf60293b5cc8515dd5beaf0e">sfInt16</a> *samples, size_t sampleCount, unsigned int channelCount, unsigned int sampleRate)</td></tr>
<tr class="memdesc:a194ce902c71f4303444abfc50ddf847e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new sound buffer and load it from an array of samples in memory.  <a href="#a194ce902c71f4303444abfc50ddf847e"></a><br/></td></tr>
<tr class="separator:a194ce902c71f4303444abfc50ddf847e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a252862b4b650aad11681f46b7bb03d18"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SoundBuffer_8h.htm#a252862b4b650aad11681f46b7bb03d18">sfSoundBuffer_copy</a> (const <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a> *soundBuffer)</td></tr>
<tr class="memdesc:a252862b4b650aad11681f46b7bb03d18"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new sound buffer by copying an existing one.  <a href="#a252862b4b650aad11681f46b7bb03d18"></a><br/></td></tr>
<tr class="separator:a252862b4b650aad11681f46b7bb03d18"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5c6b7137c8aa50b08da1db4a2f9ffa7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SoundBuffer_8h.htm#ac5c6b7137c8aa50b08da1db4a2f9ffa7">sfSoundBuffer_destroy</a> (<a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a> *soundBuffer)</td></tr>
<tr class="memdesc:ac5c6b7137c8aa50b08da1db4a2f9ffa7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy a sound buffer.  <a href="#ac5c6b7137c8aa50b08da1db4a2f9ffa7"></a><br/></td></tr>
<tr class="separator:ac5c6b7137c8aa50b08da1db4a2f9ffa7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a000b174d5c34863bf6d09f81bb700865"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> <a class="el" href="Config_8h.htm#a7559f07a31bb3a4a3d865178ce4dc70b">sfBool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SoundBuffer_8h.htm#a000b174d5c34863bf6d09f81bb700865">sfSoundBuffer_saveToFile</a> (const <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a> *soundBuffer, const char *filename)</td></tr>
<tr class="memdesc:a000b174d5c34863bf6d09f81bb700865"><td class="mdescLeft">&#160;</td><td class="mdescRight">Save a sound buffer to an audio file.  <a href="#a000b174d5c34863bf6d09f81bb700865"></a><br/></td></tr>
<tr class="separator:a000b174d5c34863bf6d09f81bb700865"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f4db2035cf3d402821915c6acaa7e00"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> const <a class="el" href="Config_8h.htm#a41552dc8bf60293b5cc8515dd5beaf0e">sfInt16</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SoundBuffer_8h.htm#a3f4db2035cf3d402821915c6acaa7e00">sfSoundBuffer_getSamples</a> (const <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a> *soundBuffer)</td></tr>
<tr class="memdesc:a3f4db2035cf3d402821915c6acaa7e00"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the array of audio samples stored in a sound buffer.  <a href="#a3f4db2035cf3d402821915c6acaa7e00"></a><br/></td></tr>
<tr class="separator:a3f4db2035cf3d402821915c6acaa7e00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b5d5a7c07a34d18b8b7e5cbd4bba124"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SoundBuffer_8h.htm#a1b5d5a7c07a34d18b8b7e5cbd4bba124">sfSoundBuffer_getSampleCount</a> (const <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a> *soundBuffer)</td></tr>
<tr class="memdesc:a1b5d5a7c07a34d18b8b7e5cbd4bba124"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of samples stored in a sound buffer.  <a href="#a1b5d5a7c07a34d18b8b7e5cbd4bba124"></a><br/></td></tr>
<tr class="separator:a1b5d5a7c07a34d18b8b7e5cbd4bba124"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad1292a6b5dfb16231699bbbdd8203929"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SoundBuffer_8h.htm#ad1292a6b5dfb16231699bbbdd8203929">sfSoundBuffer_getSampleRate</a> (const <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a> *soundBuffer)</td></tr>
<tr class="memdesc:ad1292a6b5dfb16231699bbbdd8203929"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the sample rate of a sound buffer.  <a href="#ad1292a6b5dfb16231699bbbdd8203929"></a><br/></td></tr>
<tr class="separator:ad1292a6b5dfb16231699bbbdd8203929"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8dddfac12df7ed8f7dfde67d5cdf3bb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SoundBuffer_8h.htm#aa8dddfac12df7ed8f7dfde67d5cdf3bb">sfSoundBuffer_getChannelCount</a> (const <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a> *soundBuffer)</td></tr>
<tr class="memdesc:aa8dddfac12df7ed8f7dfde67d5cdf3bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of channels used by a sound buffer.  <a href="#aa8dddfac12df7ed8f7dfde67d5cdf3bb"></a><br/></td></tr>
<tr class="separator:aa8dddfac12df7ed8f7dfde67d5cdf3bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7355363ded1eac71e4f6e6055070ba77"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> <a class="el" href="structsfTime.htm">sfTime</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SoundBuffer_8h.htm#a7355363ded1eac71e4f6e6055070ba77">sfSoundBuffer_getDuration</a> (const <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a> *soundBuffer)</td></tr>
<tr class="memdesc:a7355363ded1eac71e4f6e6055070ba77"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the total duration of a sound buffer.  <a href="#a7355363ded1eac71e4f6e6055070ba77"></a><br/></td></tr>
<tr class="separator:a7355363ded1eac71e4f6e6055070ba77"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a252862b4b650aad11681f46b7bb03d18"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a>* sfSoundBuffer_copy </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a> *&#160;</td>
          <td class="paramname"><em>soundBuffer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new sound buffer by copying an existing one. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soundBuffer</td><td>Sound buffer to copy</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A new sfSoundBuffer object which is a copy of <em>soundBuffer</em> </dd></dl>

</div>
</div>
<a class="anchor" id="afd79a633db98cd67412c2090e27eda2f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a>* sfSoundBuffer_createFromFile </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new sound buffer and load it from a file. </p>
<p>Here is a complete list of all the supported audio formats: ogg, wav, flac, aiff, au, raw, paf, svx, nist, voc, ircam, w64, mat4, mat5 pvf, htk, sds, avr, sd2, caf, wve, mpc2k, rf64.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>Path of the sound file to load</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A new sfSoundBuffer object (NULL if failed) </dd></dl>

</div>
</div>
<a class="anchor" id="ab5619dc26f92b49ad849a31c076c19cb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a>* sfSoundBuffer_createFromMemory </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sizeInBytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new sound buffer and load it from a file in memory. </p>
<p>Here is a complete list of all the supported audio formats: ogg, wav, flac, aiff, au, raw, paf, svx, nist, voc, ircam, w64, mat4, mat5 pvf, htk, sds, avr, sd2, caf, wve, mpc2k, rf64.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>Pointer to the file data in memory </td></tr>
    <tr><td class="paramname">sizeInBytes</td><td>Size of the data to load, in bytes</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A new sfSoundBuffer object (NULL if failed) </dd></dl>

</div>
</div>
<a class="anchor" id="a194ce902c71f4303444abfc50ddf847e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a>* sfSoundBuffer_createFromSamples </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="Config_8h.htm#a41552dc8bf60293b5cc8515dd5beaf0e">sfInt16</a> *&#160;</td>
          <td class="paramname"><em>samples</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sampleCount</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>channelCount</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>sampleRate</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new sound buffer and load it from an array of samples in memory. </p>
<p>The assumed format of the audio samples is 16 bits signed integer (sfInt16).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">samples</td><td>Pointer to the array of samples in memory </td></tr>
    <tr><td class="paramname">sampleCount</td><td>Number of samples in the array </td></tr>
    <tr><td class="paramname">channelCount</td><td>Number of channels (1 = mono, 2 = stereo, ...) </td></tr>
    <tr><td class="paramname">sampleRate</td><td>Sample rate (number of samples to play per second)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A new sfSoundBuffer object (NULL if failed) </dd></dl>

</div>
</div>
<a class="anchor" id="aabe469481de03c1105a6a1795d350d35"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a>* sfSoundBuffer_createFromStream </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsfInputStream.htm">sfInputStream</a> *&#160;</td>
          <td class="paramname"><em>stream</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new sound buffer and load it from a custom stream. </p>
<p>Here is a complete list of all the supported audio formats: ogg, wav, flac, aiff, au, raw, paf, svx, nist, voc, ircam, w64, mat4, mat5 pvf, htk, sds, avr, sd2, caf, wve, mpc2k, rf64.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stream</td><td>Source stream to read from</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A new sfSoundBuffer object (NULL if failed) </dd></dl>

</div>
</div>
<a class="anchor" id="ac5c6b7137c8aa50b08da1db4a2f9ffa7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> void sfSoundBuffer_destroy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a> *&#160;</td>
          <td class="paramname"><em>soundBuffer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Destroy a sound buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soundBuffer</td><td>Sound buffer to destroy </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aa8dddfac12df7ed8f7dfde67d5cdf3bb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> unsigned int sfSoundBuffer_getChannelCount </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a> *&#160;</td>
          <td class="paramname"><em>soundBuffer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the number of channels used by a sound buffer. </p>
<p>If the sound is mono then the number of channels will be 1, 2 for stereo, etc.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soundBuffer</td><td>Sound buffer object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of channels </dd></dl>

</div>
</div>
<a class="anchor" id="a7355363ded1eac71e4f6e6055070ba77"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> <a class="el" href="structsfTime.htm">sfTime</a> sfSoundBuffer_getDuration </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a> *&#160;</td>
          <td class="paramname"><em>soundBuffer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the total duration of a sound buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soundBuffer</td><td>Sound buffer object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Sound duration </dd></dl>

</div>
</div>
<a class="anchor" id="a1b5d5a7c07a34d18b8b7e5cbd4bba124"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> size_t sfSoundBuffer_getSampleCount </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a> *&#160;</td>
          <td class="paramname"><em>soundBuffer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the number of samples stored in a sound buffer. </p>
<p>The array of samples can be accessed with the sfSoundBuffer_getSamples function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soundBuffer</td><td>Sound buffer object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of samples </dd></dl>

</div>
</div>
<a class="anchor" id="ad1292a6b5dfb16231699bbbdd8203929"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> unsigned int sfSoundBuffer_getSampleRate </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a> *&#160;</td>
          <td class="paramname"><em>soundBuffer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the sample rate of a sound buffer. </p>
<p>The sample rate is the number of samples played per second. The higher, the better the quality (for example, 44100 samples/s is CD quality).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soundBuffer</td><td>Sound buffer object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Sample rate (number of samples per second) </dd></dl>

</div>
</div>
<a class="anchor" id="a3f4db2035cf3d402821915c6acaa7e00"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> const <a class="el" href="Config_8h.htm#a41552dc8bf60293b5cc8515dd5beaf0e">sfInt16</a>* sfSoundBuffer_getSamples </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a> *&#160;</td>
          <td class="paramname"><em>soundBuffer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the array of audio samples stored in a sound buffer. </p>
<p>The format of the returned samples is 16 bits signed integer (sfInt16). The total number of samples in this array is given by the sfSoundBuffer_getSampleCount function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soundBuffer</td><td>Sound buffer object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Read-only pointer to the array of sound samples </dd></dl>

</div>
</div>
<a class="anchor" id="a000b174d5c34863bf6d09f81bb700865"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Audio_2Export_8h.htm#a7a489e428c325519799913f98f81f774">CSFML_AUDIO_API</a> <a class="el" href="Config_8h.htm#a7559f07a31bb3a4a3d865178ce4dc70b">sfBool</a> sfSoundBuffer_saveToFile </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="Audio_2Types_8h.htm#a33a83b50f46a6b0d9c8b5bd9808e2b3f">sfSoundBuffer</a> *&#160;</td>
          <td class="paramname"><em>soundBuffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>filename</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Save a sound buffer to an audio file. </p>
<p>Here is a complete list of all the supported audio formats: ogg, wav, flac, aiff, au, raw, paf, svx, nist, voc, ircam, w64, mat4, mat5 pvf, htk, sds, avr, sd2, caf, wve, mpc2k, rf64.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soundBuffer</td><td>Sound buffer object </td></tr>
    <tr><td class="paramname">filename</td><td>Path of the sound file to write</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>sfTrue if saving succeeded, sfFalse if it failed </dd></dl>

</div>
</div>
</div><!-- contents -->
        </div>
        <div id="footer-container">
            <div id="footer">
                Copyright � Laurent Gomila &nbsp;::&nbsp;
                Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> &nbsp;::&nbsp;
            </div>
        </div>
    </body>
</html>