28 #include <SFML/Audio/SoundBufferRecorder.hpp>
38 bool SoundBufferRecorder::OnStart()
49 bool SoundBufferRecorder::OnProcessSamples(
const Int16* Samples, std::size_t SamplesCount)
51 std::copy(Samples, Samples + SamplesCount, std::back_inserter(mySamples));
60 void SoundBufferRecorder::OnStop()
62 if (!mySamples.empty())
unsigned int GetSampleRate() const
Get the sample rate.
bool LoadFromSamples(const Int16 *Samples, std::size_t SamplesCount, unsigned int ChannelsCount, unsigned int SampleRate)
Load the sound buffer from an array of samples - assumed format for samples is 16 bits signed integer...
const SoundBuffer & GetBuffer() const
Get the sound buffer containing the captured audio data.
SoundBuffer is the low-level for loading and manipulating sound buffers.