0
0

In my game I sometimes require to play a sound multiple times in succession sometimes before the previous instance of the sound managed to finish. E.g. when the player moves the mouse over a button in the menu, a “button hover” sound is played. But if the player moves the mouse over the button very quickly in succession the sound doesn’t get played every time. It gets played only when the previous instance of it has fully finished playing.
In DirectSound I handled this by creating a CSound (the same CSound that you get with the DX SDK) with multiple buffers and then, when the sound needed to play, I called the CSound::GetFreeBuffer function to get a pointer to a free buffer that I then played.
Is there a equivalent to this in FMOD or do I just have to create multiple streams with the same sound data and then, when I need to play the sound, loop through the streams and play the currently non playing one?

  • You must to post comments
0
0

Dam! I was using streams for all my sounds (eaven 4 KB ones) that’s why it didn’t work like expected (streams can be played only once at a time). Now I’m using samples and the FSOUND_Sample_SetMaxPlaybacks function and everything is working ok.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.