Loading...
Searching...
No Matches
SoundBuffer.h
Go to the documentation of this file.
7// In no event will the authors be held liable for any damages arising from the use of this software.
67CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_createFromMemory(const void* data, size_t sizeInBytes);
138CSFML_AUDIO_API bool sfSoundBuffer_saveToFile(const sfSoundBuffer* soundBuffer, const char* filename);
206CSFML_AUDIO_API sfSoundChannel* sfSoundBuffer_getChannelMap(const sfSoundBuffer* soundBuffer, size_t* count);
sfSoundBuffer * sfSoundBuffer_copy(const sfSoundBuffer *soundBuffer)
Create a new sound buffer by copying an existing one.
sfSoundChannel * sfSoundBuffer_getChannelMap(const sfSoundBuffer *soundBuffer, size_t *count)
Get the map of position in sample frame to sound channel.
unsigned int sfSoundBuffer_getSampleRate(const sfSoundBuffer *soundBuffer)
Get the sample rate of a sound buffer.
sfSoundBuffer * sfSoundBuffer_createFromMemory(const void *data, size_t sizeInBytes)
Create a new sound buffer and load it from a file in memory.
void sfSoundBuffer_destroy(const sfSoundBuffer *soundBuffer)
Destroy a sound buffer.
sfSoundBuffer * sfSoundBuffer_createFromSamples(const int16_t *samples, uint64_t sampleCount, unsigned int channelCount, unsigned int sampleRate, sfSoundChannel *channelMapData, size_t channelMapSize)
Create a new sound buffer and load it from an array of samples in memory.
unsigned int sfSoundBuffer_getChannelCount(const sfSoundBuffer *soundBuffer)
Get the number of channels used by a sound buffer.
sfSoundBuffer * sfSoundBuffer_createFromStream(sfInputStream *stream)
Create a new sound buffer and load it from a custom stream.
uint64_t sfSoundBuffer_getSampleCount(const sfSoundBuffer *soundBuffer)
Get the number of samples stored in a sound buffer.
bool sfSoundBuffer_saveToFile(const sfSoundBuffer *soundBuffer, const char *filename)
Save a sound buffer to an audio file.
const int16_t * sfSoundBuffer_getSamples(const sfSoundBuffer *soundBuffer)
Get the array of audio samples stored in a sound buffer.
sfTime sfSoundBuffer_getDuration(const sfSoundBuffer *soundBuffer)
Get the total duration of a sound buffer.
sfSoundBuffer * sfSoundBuffer_createFromFile(const char *filename)
Create a new sound buffer and load it from a file.
sfSoundChannel
Types of sound channels that can be read/written from sound buffers/files.
Definition SoundChannel.h:39
Set of callbacks that allow users to define custom file streams.
Definition InputStream.h:46