0
0

When I call EventProject::getEvent() it returns FMOD_OK but the ptr to the event is 0x00000001. Subsequent calls to getEvent() will return the ptrs:
0x00000002,
0x00000003,
0x00000004,
etc…
Obviously these are not valid ptrs. They look more like handles.
SimpleEvent sample works fine. Here is the gist of the code:
[code:2qxr729o]
result = m_pEventSystem->init(nMaxVoices, FMOD_INIT_NORMAL, 0);
result = m_pEventSystem->getSystemObject(&m_pSystem);
result = FMOD::NetEventSystem_Init(m_pEventSystem, kNetHelperPort);
result = m_pSystem->setFileSystem(myopen, myclose, myread, myseek, 2048);
result = m_pEventSystem->load(pFilename, pLoadInfo, &m_pEventProject);
result = m_pEventProject->getEvent(pName, FMOD_EVENT_DEFAULT, &pEvent);
[/code:2qxr729o]

The event name is correct and all results are FMOD_OK. Any ideas?

  • You must to post comments
0
0

Ok, so apparently this is working correctly. Either my debugger is hosed or there’s some sinister operator overloading going on, where 0x00000001 can be a valid ptr… That’s concentrated pure evil.

  • You must to post comments
0
0

There is nothing wrong with your debugger, they are as you say simply handles. Dereferencing a "pure evil :p" pointer like that will only cause a problem if the called function uses the "this" pointer to access any members. Internally we translate the pointer into something usable and pass the parameters through. The idea is it gives you the syntax of C++ classes with the flexibility of handles.

There should be no need to inspect the value of the handles anyway, just ensure you check the result from every FMOD function and all will be well.

  • You must to post comments
0
0

[quote:27mm0hb3]There is nothing wrong with your debugger, they are as you say simply handles. Dereferencing a "pure evil :p" pointer like that will only cause a problem if the called function uses the "this" pointer to access any members. Internally we translate the pointer into something usable and pass the parameters through.[/quote:27mm0hb3]

Ah I see what you’re doing. Tricky! Thanks for the info.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.