25#ifndef SFML_SOUNDRECORDER_HPP
26#define SFML_SOUNDRECORDER_HPP
31#include <SFML/System/Thread.hpp>
59 void Start(
unsigned int SampleRate = 44100);
100 virtual bool OnStart();
111 virtual bool OnProcessSamples(
const Int16* Samples, std::size_t SamplesCount) = 0;
117 virtual void OnStop();
129 void ProcessCapturedSamples();
140 std::vector<Int16> mySamples;
141 unsigned int mySampleRate;
static bool CanCapture()
Tell if the system supports sound capture.
SoundRecorder()
Default constructor.
void Start(unsigned int SampleRate=44100)
Start the capture.
void Stop()
Stop the capture.
unsigned int GetSampleRate() const
Get the sample rate.
Thread(FuncType Function, void *UserData=NULL)
Construct the thread from a function pointer.