Trying to find something about this in the manuals and in the forum, but haven’t found anything yet.
I have an event that has max playbacks set to 4. It is set to onehot == Yes. For each new event i call:
FMOD_EventSystem_GetEvent(eventsystem, "path/to/event", FMOD_EVENT_DEFAULT, &event);
This works just fine, I can play how many events of this type I want. Then I add an Event callback to the event in order to update my program when the oneshot events has finished playing. The callback functions work, but when i play the fifth event of this type (maxPlaybacks +1), the program crashes and I get an FMOD_ERR_FILE_UNWANTED error message.
Just before it crashes, an EVENT_STOLEN callback is received.
What can I do to fix this problem?
- gummipekk asked 8 years ago
Your callback should look something like this:
[code:19eiqjpo]FMOD_RESULT F_CALLBACK FMOD_EVENT_CALLBACK(
FMOD_EVENT * event,
void * param1,
void * param2,
void * userdata)
// More code goes here. return FMOD_OK;
Your callback signature must exactly match what is required (no casting!) and you callback must return an FMOD_RESULT, usually FMOD_OK.
Did you get this behaviour before you added your callback? If not what are doing inside the callback? Does the callback return FMOD_OK?
The FMOD_ERR_FILE_UNWANTED error should only occur for getevent calls where the user has specified FMOD_EVENT_ERROR_ON_DISKACCESS as a mode flag, since you’re using FMOD_EVENT_DEFAULT you shouldn’t be seeing this error.
Please login first to submit.