Hi! I’m sorry if my question was already asked but I cannot find anything in the past threads. I’m looking for events (callback) to know when the state of a channel change. Example:
- isPlaying changed
- getLoopCount changed
- …
I really don’t want to polling all that functions!
- Mark81 asked 7 months ago
- You must login to post comments
Hi Mark,
There aren’t any callbacks for those sort of state changes like those; you will need to query them periodically to check if they are changed.
There are some Studio Event callbacks that you can use to check various states:
I hope this helped.
Thanks,
Richard
- Richard Simms answered 7 months ago
Thanks. In low-level API what is the right way to know if a sound has ended? I would check both isPlaying() == false && getPause() == false. Is it correct?
Hi Mark81,
If you’re using FMOD Studio events, you can use the FMOD_STUDIO_EVENT_CALLBACK_SOUND_STOPPED callback from the FMOD_STUDIO_EVENT_CALLBACK_TYPE. If you’re using the low-level API (ie. FMOD::Sound) then you will need to use the two functions you listed.
Thanks,
Richard
- You must login to post comments
Please login first to submit.