I just came upon a problem with the sf::SoundBufferRecorder. I am trying to use it in a loop just like this:
sf::SoundBufferRecorder Recorder;
vector< sf::SoundBuffer> RecBuffer(n);
for (i=0; i<n; i++) {
\\do something
Recorder.Start() ;
\\ Wait for something
Recorder.Stop();
RecBuffer[i]=Recorder.GetBuffer() ;
}
That does not work, because when saving the content of the RecBuffer, all file have the same size and content, namly the first input.
So what I did, I createt the sf::SoundBufferRecorder as an array and changed the loop accordingly. That works fine, but is it the right way?!
By the way, creating it as a vector (like the sf::SoundBuffer) instead of an array it gives me an error, that's why I am unsure about the array solution.
May be I did not properly understand the functionality of the sf::SoundBufferRecorder?!? Could anybody help?! I need to record stuff in a loop (experimental trials) and save it as file.
Oh, yeah, I'm using SFML 1.3 with XP SP2.
thanx