I come to see you because I have not found a callback during a playback of a sound not a stream.
The Read Data Callback et the Setpos callback work very fine for a stream, but I need the same thing for a sound.
If not, I have to make a timer like in fmod 3, and it’s not very beautiful and very exact.
An another problem :
How to record a sound in Fmod 4 without specify a time duration?
Someone has an example about (circular buffer) or something like this?
Thanks very much!
Since I’m in hollidays during a month, I’ll ask you a lot of things about Fmod and audio programming, excuse me in advance.
- tictactouc asked 11 years ago
[quote:er3ehcpx]How to record a sound in Fmod 4 without specify a time duration?
Someone has an example about (circular buffer) or something like this? [/quote:er3ehcpx]
I managed to record without length limitations by creating a buffer, making it looping, then polling recordPosition.
When the recording position goes past half of buffer capacity the first half can be safely locked and saved, when the cursor goes back to the beginning you can save the second half and so on.
A callback would have made things cleaner, may be, but I have not been able to find a way to set it up in recording. Anyway this procedure is easy enough to implement, and works 😀
Of course you have to finalize your wav file after finishing recording, since you can’t know the size of data chunk in advance.
Oh! thanks David, very happy for your answer!
But, I’ve allready tried this procedure with no success, certainely because I have not found this very cleaner.
Now, I Know that an another person had the same idea and it works,
I’ll go to retry it with more convictions.
See you soon.
- tictactouc answered 11 years ago
Please login first to submit.