I’m trying to understand some of the different parameters I’m encountering on loading a designer project and the associated data.

I would like to selectively load EventGroups from an EventSystem.

I first call:


now, one of the parameters for this is

bool cacheevents

and the documentation says that if this is true then all event instances within this group will be pre-allocated.
This sounds to me like a good thing, as a common rule of thumb in game programming is that you don’t want to do any memory allocation during gameplay.

Now, if I understand correctly, I still have not loaded the actual raw sound data (in the .fsb file) associated with any particular event.

Again, I would like to do all the disk access and memory allocation at load time, so now I want to call EventGroup::loadEventData on the EventGroup I have just fetched with the above call.

For the EVENT_MODE parameter, the documentation says that this call only uses the EVENT_NONBLOCKING flag, and if this is set then all event instances within this group will be allocated.

So, what is the difference between this and cacheevents flag above?

Also, I would like to pre-allocate the events, but I don’t particularly want the loading to be non-blocking. so what should I set the EVENT_MODE parameter to?

Thanks in advance

  • You must to post comments

I believe the cached events are event handles for the maximum number of events in the project.

Lets say you set Max Playbacks to 10, it would allocate 10 ‘slots’ ready for getevent/geteventbyindex.

I’ve not done it, but you can unblock the load, and use a callback iirc to know when your data is loaded in.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.