I got trouble using Fmod in conjunction with OpenGL in a Windows API program (thatmay not be the limit of the problem, but that’s all I’ve tried). When playing a sound, there is a high latency of over half a second.
When substituting the PlaySound-API function at the exact same line, the latency disappears. I’m trying to play a small, simple .wav.
When using the Fmod samples, I didn’t get the latency, but couldn’t find a difference in the code.
- reign_bow asked 15 years ago
Hi. (SFM Bad E)
I have got the same problem.
Here is description:
This I used for the first time:
I loaded stream.
sound is done
-after some while-
I called FSOUND_Stream_Play (on stopped stream), but
sound starts with latency
when stream is no more playing (EndCallback), you should call FSOUND_Stream_Close. And ever when you want to play it, you should call FSOUND_Stream_OpenFile and FSOUND_Stream_Play
(for more accuracy data should be permanently in memory (use FSOUND_LOAD_MEMORY flag)). Latency in this case is lower then in first case. I don’t know why (loading may be longer than simple stop/play), but …
I am actually running Win98 SE, with output set to FSOUND_OUTPUT_DSOUND. Changing teh buffer size didn’t make a wit of difference. Neither did using a consol application instead. However, the problem must lie with fmod. Does it have any trouble with MSVC or the debugging mode, perhaps?
Thanks a lot! My French should suffice, I think. Even if the example doesn’thelp, I picked up 2 other clues:
-setting the buffer size to a small value might help (I left it at default)
-there is one difference to the Fmod example: my game is a WinApp. Perhaps I should try out making it a console app.
Merci bien 😉
Please login first to submit.