I’ve seen that EventQueue and EventQueueEntry were added to the API but the documentation on them is incomplete. When are you planning to update it?
I´m asking because I´m about to implement a system that seems very similar to that, and I don´t want to replicate existing functionality.
- JoseCastro asked 8 years ago
…I too wanted to play with this sooner rather than later, so I’ve been hacking and guessing how this works today!
Seems you can create the EventQueue from the EventSystem then add EventQueueEntry objects which will play automatically as they reach the front of the queue. It took me a while to figure that Events wrapped by an EventQueueEntry need to be created with the FMOD_EVENT_INFOONLY mode otherwise createEventQueueEntry() fails. Also if eventsystem->unload() is called then this also unloads the EventQueue and will need to be re-created. (I’m experimenting with this for interactive dialogue and the moment and discovered this when unloading to switch languages and reload the appropiate language FEV.)
Something like this seems to work great:
ERRCHECK(result = eventsystem->createEventQueue(&queue));
FMOD::Event *event; FMOD::EventQueueEntry *entry; ERRCHECK(result = eventsystem->getEvent("project/group/event00", FMOD_EVENT_INFOONLY, &event)); ERRCHECK(result = eventsystem->createEventQueueEntry(event, &entry)); ERRCHECK(result = queue->add(entry)); ERRCHECK(result = eventsystem->getEvent("project/group/event01", FMOD_EVENT_INFOONLY, &event)); ERRCHECK(result = eventsystem->createEventQueueEntry(event, &entry)); ERRCHECK(result = queue->add(entry));
… just not sure what the memory management contract is.
Please login first to submit.