0
0

Hi, I am a newbie. I found FMOD LIB is really great.

But I am not very familiar with CALLBACKS

I don’t know how to use them…

E.G: How can I get notified when a sound stop…???
Can I “receive a message” like “WM_SOUNDSTOP”???
Should I check the state via a loop? And is this way efficient?

And the update() func of System sees to do nothing. I didnot use it and my program works fine. Do I need to set a timer to update it regularly?
Thanks.

  • You must to post comments
0
0

You have to set-up a callback on your channel with type CALLBACK_END.

That callback, if the channel had finished playing, would be called on a sync-point (e.g. everytime FMOD_System_Update() is called).

I actually have a problem relying on that callback (FMOD 4.02.10 and the beta of 4.02.11). My sounds sometimes finish earlier (if they are streamed xma), or never finish (if they are non-streamed xma or pcm16). That is happening on the Xenon platform.

I’ll be testing today that with the other platforms.

My previous way of checking for end of channel was to ask the channel is it playing (but that’s not the correct way, as the channel’s are auto-freeing kind of objects, so you’ll end up with giving sometime/someday invalid pointer to FMOD, so it should be avoided (even if it solves my current problem, then again pointers are not unique (unlike handles) so it cannot work all the time).

  • You must to post comments
0
0

Thank you very much.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.