#include <SFML/Config.h>
#include <SFML/Audio/SoundBuffer.h>
Go to the source code of this file.
Typedefs | |
typedef sfSoundRecorder | sfSoundRecorder |
sfSoundRecorder is an interface for capturing sound data | |
typedef sfBool(*) | sfSoundRecorderStartCallback (void *) |
Type of the callback used when starting a capture. | |
typedef sfBool(*) | sfSoundRecorderProcessCallback (const sfInt16 *, size_t, void *) |
Type of the callback used to process audio data. | |
typedef void(*) | sfSoundRecorderStopCallback (void *) |
Type of the callback used when stopping a capture. | |
Functions | |
CSFML_API sfSoundRecorder * | sfSoundRecorder_Create (sfSoundRecorderStartCallback OnStart, sfSoundRecorderProcessCallback OnProcess, sfSoundRecorderStopCallback OnStop, void *UserData) |
Construct a new sound recorder with callback functions for processing captured samples. | |
CSFML_API void | sfSoundRecorder_Destroy (sfSoundRecorder *SoundRecorder) |
Destroy an existing sound recorder. | |
CSFML_API void | sfSoundRecorder_Start (sfSoundRecorder *SoundRecorder, unsigned int SampleRate) |
Start the capture. | |
CSFML_API void | sfSoundRecorder_Stop (sfSoundRecorder *SoundRecorder) |
Stop the capture. | |
CSFML_API unsigned int | sfSoundRecorder_GetSampleRate (sfSoundRecorder *SoundRecorder) |
Get the sample rate of a sound recorder. | |
CSFML_API sfBool | sfSoundRecorder_CanCapture () |
Tell if the system supports sound capture. |
typedef struct sfSoundRecorder sfSoundRecorder |
sfSoundRecorder is an interface for capturing sound data
Definition at line 38 of file SoundRecorder.h.
typedef sfBool(*) sfSoundRecorderProcessCallback(const sfInt16 *, size_t, void *) |
typedef sfBool(*) sfSoundRecorderStartCallback(void *) |
typedef void(*) sfSoundRecorderStopCallback(void *) |
CSFML_API sfBool sfSoundRecorder_CanCapture | ( | ) |
Tell if the system supports sound capture.
If not, this class won't be usable
CSFML_API sfSoundRecorder* sfSoundRecorder_Create | ( | sfSoundRecorderStartCallback | OnStart, | |
sfSoundRecorderProcessCallback | OnProcess, | |||
sfSoundRecorderStopCallback | OnStop, | |||
void * | UserData | |||
) |
Construct a new sound recorder with callback functions for processing captured samples.
OnStart | : Callback function which will be called when a new capture starts (can be NULL) | |
OnProcess | : Callback function which will be called each time there's audio data to process | |
OnStop | : Callback function which will be called when the current capture stops (can be NULL) | |
UserData | : Data to pass to the callback function (can be NULL) |
CSFML_API void sfSoundRecorder_Destroy | ( | sfSoundRecorder * | SoundRecorder | ) |
Destroy an existing sound recorder.
SoundRecorder | : Sound recorder to delete |
CSFML_API unsigned int sfSoundRecorder_GetSampleRate | ( | sfSoundRecorder * | SoundRecorder | ) |
Get the sample rate of a sound recorder.
SoundRecorder | : Sound recorder to get sample rate from |
CSFML_API void sfSoundRecorder_Start | ( | sfSoundRecorder * | SoundRecorder, | |
unsigned int | SampleRate | |||
) |
Start the capture.
Warning : only one capture can happen at the same time
SoundRecorder | : Sound recorder to start | |
SampleRate | : Sound frequency (the more samples, the higher the quality) |
CSFML_API void sfSoundRecorder_Stop | ( | sfSoundRecorder * | SoundRecorder | ) |
Stop the capture.
SoundRecorder | : Sound recorder to stop |