Loading...
Searching...
No Matches
SoundRecorder.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.
84CSFML_AUDIO_API bool sfSoundRecorder_start(sfSoundRecorder* soundRecorder, unsigned int sampleRate);
106CSFML_AUDIO_API unsigned int sfSoundRecorder_getSampleRate(const sfSoundRecorder* soundRecorder);
159CSFML_AUDIO_API bool sfSoundRecorder_setDevice(sfSoundRecorder* soundRecorder, const char* name);
185CSFML_AUDIO_API void sfSoundRecorder_setChannelCount(sfSoundRecorder* soundRecorder, unsigned int channelCount);
198CSFML_AUDIO_API unsigned int sfSoundRecorder_getChannelCount(const sfSoundRecorder* soundRecorder);
212CSFML_AUDIO_API sfSoundChannel* sfSoundRecorder_getChannelMap(const sfSoundRecorder* soundRecorder, size_t* count);
sfSoundChannel
Types of sound channels that can be read/written from sound buffers/files.
Definition SoundChannel.h:39
sfSoundRecorder * sfSoundRecorder_create(sfSoundRecorderStartCallback onStart, sfSoundRecorderProcessCallback onProcess, sfSoundRecorderStopCallback onStop, void *userData)
Construct a new sound recorder from callback functions.
bool sfSoundRecorder_setDevice(sfSoundRecorder *soundRecorder, const char *name)
Set the audio capture device.
bool sfSoundRecorder_isAvailable(void)
Check if the system supports audio capture.
const char * sfSoundRecorder_getDevice(sfSoundRecorder *soundRecorder)
Get the name of the current audio capture device.
void sfSoundRecorder_destroy(const sfSoundRecorder *soundRecorder)
Destroy a sound recorder.
void sfSoundRecorder_stop(sfSoundRecorder *soundRecorder)
Stop the capture of a sound recorder.
void sfSoundRecorder_setChannelCount(sfSoundRecorder *soundRecorder, unsigned int channelCount)
Set the channel count of the audio capture device.
const char *const * sfSoundRecorder_getAvailableDevices(size_t *count)
Get a list of the names of all available audio capture devices.
bool sfSoundRecorder_start(sfSoundRecorder *soundRecorder, unsigned int sampleRate)
Start the capture of a sound recorder.
unsigned int sfSoundRecorder_getSampleRate(const sfSoundRecorder *soundRecorder)
Get the sample rate of a sound recorder.
const char * sfSoundRecorder_getDefaultDevice(void)
Get the name of the default audio capture device.
void(* sfSoundRecorderStopCallback)(void *)
Type of the callback used when stopping a capture.
Definition SoundRecorder.h:41
unsigned int sfSoundRecorder_getChannelCount(const sfSoundRecorder *soundRecorder)
Get the number of channels used by this recorder.
bool(* sfSoundRecorderStartCallback)(void *)
Type of the callback used when starting a capture.
Definition SoundRecorder.h:39
bool(* sfSoundRecorderProcessCallback)(const int16_t *, size_t, void *)
Type of the callback used to process audio data.
Definition SoundRecorder.h:40
sfSoundChannel * sfSoundRecorder_getChannelMap(const sfSoundRecorder *soundRecorder, size_t *count)
Get the map of position in sample frame to sound channel.