Go to the source code of this file.
Functions | |
CSFML_AUDIO_API sfSoundBufferRecorder * | sfSoundBufferRecorder_create (void) |
Create a new sound buffer recorder. | |
CSFML_AUDIO_API void | sfSoundBufferRecorder_destroy (sfSoundBufferRecorder *soundBufferRecorder) |
Destroy a sound buffer recorder. | |
CSFML_AUDIO_API void | sfSoundBufferRecorder_start (sfSoundBufferRecorder *soundBufferRecorder, unsigned int sampleRate) |
Start the capture of a sound recorder recorder. | |
CSFML_AUDIO_API void | sfSoundBufferRecorder_stop (sfSoundBufferRecorder *soundBufferRecorder) |
Stop the capture of a sound recorder. | |
CSFML_AUDIO_API unsigned int | sfSoundBufferRecorder_getSampleRate (const sfSoundBufferRecorder *soundBufferRecorder) |
Get the sample rate of a sound buffer recorder. | |
CSFML_AUDIO_API const sfSoundBuffer * | sfSoundBufferRecorder_getBuffer (const sfSoundBufferRecorder *soundBufferRecorder) |
Get the sound buffer containing the captured audio data. | |
CSFML_AUDIO_API sfSoundBufferRecorder* sfSoundBufferRecorder_create | ( | void | ) |
Create a new sound buffer recorder.
CSFML_AUDIO_API void sfSoundBufferRecorder_destroy | ( | sfSoundBufferRecorder * | soundBufferRecorder | ) |
Destroy a sound buffer recorder.
soundBufferRecorder | Sound buffer recorder to destroy |
CSFML_AUDIO_API const sfSoundBuffer* sfSoundBufferRecorder_getBuffer | ( | const sfSoundBufferRecorder * | soundBufferRecorder | ) |
Get the sound buffer containing the captured audio data.
The sound buffer is valid only after the capture has ended. This function provides a read-only access to the internal sound buffer, but it can be copied if you need to make any modification to it.
soundBufferRecorder | Sound buffer recorder object |
CSFML_AUDIO_API unsigned int sfSoundBufferRecorder_getSampleRate | ( | const sfSoundBufferRecorder * | soundBufferRecorder | ) |
Get the sample rate of a sound buffer recorder.
The sample rate defines the number of audio samples captured per second. The higher, the better the quality (for example, 44100 samples/sec is CD quality).
soundBufferRecorder | Sound buffer recorder object |
CSFML_AUDIO_API void sfSoundBufferRecorder_start | ( | sfSoundBufferRecorder * | soundBufferRecorder, |
unsigned int | sampleRate | ||
) |
Start the capture of a sound recorder recorder.
The sampleRate parameter defines the number of audio samples captured per second. The higher, the better the quality (for example, 44100 samples/sec is CD quality). This function uses its own thread so that it doesn't block the rest of the program while the capture runs. Please note that only one capture can happen at the same time.
soundBufferRecorder | Sound buffer recorder object |
sampleRate | Desired capture rate, in number of samples per second |
CSFML_AUDIO_API void sfSoundBufferRecorder_stop | ( | sfSoundBufferRecorder * | soundBufferRecorder | ) |
Stop the capture of a sound recorder.
soundBufferRecorder | Sound buffer recorder object |