#include <SFML/Config.h>
Go to the source code of this file.
Typedefs | |
typedef sfSoundBuffer | sfSoundBuffer |
sfSoundBuffer is the low-level for loading and manipulating sound buffers | |
Functions | |
CSFML_API sfSoundBuffer * | sfSoundBuffer_CreateFromFile (const char *Filename) |
Create a new sound buffer and load it from a file. | |
CSFML_API sfSoundBuffer * | sfSoundBuffer_CreateFromMemory (const char *Data, size_t SizeInBytes) |
Create a new sound buffer and load it from a file in memory. | |
CSFML_API sfSoundBuffer * | sfSoundBuffer_CreateFromSamples (const sfInt16 *Samples, size_t SamplesCount, unsigned int ChannelsCount, unsigned int SampleRate) |
Create a new sound buffer and load it from an array of samples in memory - assumed format for samples is 16 bits signed integer. | |
CSFML_API void | sfSoundBuffer_Destroy (sfSoundBuffer *SoundBuffer) |
Destroy an existing sound buffer. | |
CSFML_API sfBool | sfSoundBuffer_SaveToFile (sfSoundBuffer *SoundBuffer, const char *Filename) |
Save a sound buffer to a file. | |
CSFML_API const sfInt16 * | sfSoundBuffer_GetSamples (sfSoundBuffer *SoundBuffer) |
Return the samples contained in a sound buffer. | |
CSFML_API size_t | sfSoundBuffer_GetSamplesCount (sfSoundBuffer *SoundBuffer) |
Return the number of samples contained in a sound buffer. | |
CSFML_API unsigned int | sfSoundBuffer_GetSampleRate (sfSoundBuffer *SoundBuffer) |
Get the sample rate of a sound buffer. | |
CSFML_API unsigned int | sfSoundBuffer_GetChannelsCount (sfSoundBuffer *SoundBuffer) |
Return the number of channels of a sound buffer (1 = mono, 2 = stereo, . | |
CSFML_API float | sfSoundBuffer_GetDuration (sfSoundBuffer *SoundBuffer) |
Get the duration of a sound buffer. |
typedef struct sfSoundBuffer sfSoundBuffer |
sfSoundBuffer is the low-level for loading and manipulating sound buffers
Definition at line 38 of file SoundBuffer.h.
CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromFile | ( | const char * | Filename | ) |
Create a new sound buffer and load it from a file.
Filename | : Path of the music file to open |
CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromMemory | ( | const char * | Data, | |
size_t | SizeInBytes | |||
) |
Create a new sound buffer and load it from a file in memory.
Data | : Pointer to the file data in memory | |
SizeInBytes | : Size of the data to load, in bytes |
CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromSamples | ( | const sfInt16 * | Samples, | |
size_t | SamplesCount, | |||
unsigned int | ChannelsCount, | |||
unsigned int | SampleRate | |||
) |
Create a new sound buffer and load it from an array of samples in memory - assumed format for samples is 16 bits signed integer.
Samples | : Pointer to the samples in memory | |
SamplesCount | : Number of samples pointed by Samples | |
ChannelsCount | : Number of channels (1 = mono, 2 = stereo, ...) | |
SampleRate | : Frequency (number of samples to play per second) |
CSFML_API void sfSoundBuffer_Destroy | ( | sfSoundBuffer * | SoundBuffer | ) |
Destroy an existing sound buffer.
SoundBuffer | : Sound buffer to delete |
CSFML_API unsigned int sfSoundBuffer_GetChannelsCount | ( | sfSoundBuffer * | SoundBuffer | ) |
Return the number of channels of a sound buffer (1 = mono, 2 = stereo, .
..)
SoundBuffer | : Sound buffer to get channels count from |
CSFML_API float sfSoundBuffer_GetDuration | ( | sfSoundBuffer * | SoundBuffer | ) |
Get the duration of a sound buffer.
SoundBuffer | : Sound buffer to get duration from |
CSFML_API unsigned int sfSoundBuffer_GetSampleRate | ( | sfSoundBuffer * | SoundBuffer | ) |
Get the sample rate of a sound buffer.
SoundBuffer | : Sound buffer to get sample rate from |
CSFML_API const sfInt16* sfSoundBuffer_GetSamples | ( | sfSoundBuffer * | SoundBuffer | ) |
Return the samples contained in a sound buffer.
SoundBuffer | : Sound buffer to get samples from |
CSFML_API size_t sfSoundBuffer_GetSamplesCount | ( | sfSoundBuffer * | SoundBuffer | ) |
Return the number of samples contained in a sound buffer.
SoundBuffer | : Sound buffer to get samples count from |
CSFML_API sfBool sfSoundBuffer_SaveToFile | ( | sfSoundBuffer * | SoundBuffer, | |
const char * | Filename | |||
) |
Save a sound buffer to a file.
SoundBuffer | : Sound buffer to save | |
Filename | : Path of the sound file to write |