0
0

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.

  • You must to post comments
0
0

getState and EVENT_STATE deal with bitwise operations, so if you’re getting 9 returned, that’s telling you that

EVENT_STATE_READY 0x00000001
and
EVENT_STATE_PLAYING 0x00000008

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
[code:1nixvica]
EVENT_STATE state;
FMOD_RESULT result = m_pEvent->getState(&state);
ERRCHECK(result);
bool bTestTrue = (state & EVENT_STATE_READY) && (state & EVENT_STATE_CHANNELSACTIVE);
[/code:1nixvica]
(You can test bitwise values in different ways but I’m making it clear above)

  • You must to post comments
0
0

thanks for clearing that up. i didn’t realize that more than one state would be true at a time.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.