i am getting results that are not defined as EVENT_STATE values. the two values i’m getting are 9 and 24. 24 is what i normally get when the event is not playing, loading, etc (seems like i should be getting EVENT_STATE_READY here). the state is getting set to 9 in a case where getState returns FMOD_ERR_INVALID_HANDLE. i know why this error is happening, but the state values don’t give me any useful information.
- dave7L asked 10 years ago
getState and EVENT_STATE deal with bitwise operations, so if you’re getting 9 returned, that’s telling you that
are both true (1+8 = 9), and the other flags are false.
If you wanted to check if it was ready and the channels were active (for sake of argument), do something like
FMOD_RESULT result = m_pEvent->getState(&state);
bool bTestTrue = (state & EVENT_STATE_READY) && (state & EVENT_STATE_CHANNELSACTIVE);
(You can test bitwise values in different ways but I’m making it clear above)
- crouton answered 10 years ago
Please login first to submit.