Hello,
in sfml documentation i found that:
" .. You only have a single virtual function to override in your derived class: onProcessSamples. It is called everytime a new chunk of audio samples is captured, so this is where you implement your specific stuff.
Audio samples are provided to the onProcessSamples function every 100 ms. This is currently hard-coded into SFML and you can't change that (unless you modify SFML itself). This may change in the future. .."this means that only line i have to change for custom time of calling onProcessSamples is in this function:
void SoundRecorder::record()
{
while (m_isCapturing)
{
// Process available samples
processCapturedSamples();
// Don't bother the CPU while waiting for more captured data
sleep(milliseconds(100));
}
// Capture is finished : clean up everything
cleanup();
// Notify derived class
onStop();
}
?