Hello Laurent and everybody else!
I am playing around with spectral analysis (with FFT) and stuff like that, and as SFML can record sounds,
I thought it would be great if I could analyze not only sounds stored in a file, but in real time, as it comes out of my speakers, or goes into my microphone. (You know, everyone loves spectrograms...)
But upon deriving my recorder class from SoundRecorder I have seen that it hands me the samples in batches of roughly 4410 long (10 times a second), which is a bit "laggy", if you are watching the spectrogram.
This is because you have that 100 ms sleep in SoundRecorder.cpp somewhere.
I have hacked my copy of SFML to make this delay configurable, and setting it to 10 ms is quite a lot better.
So I think maybe you should make this option available in the mainstream source too, because some applications require lots of small sample batches very frequently (like this one), while others are OK with a few large ones, and want to spare with resources. (Although on today's multi-core computers a few hundred calls of a function this small every second is not a big deal, especially on a separate thread.)
Greetings:
Attila