0
0

Hello.

I recently converted our audio system to a new system using FMOD events. In my system, I keep a list of loaded / playing FMOD::Events. As soon as the callback reports that the event is finished (oneshot event), I try to free the event ( event->getParentGroup( &group); group->freeEventData( event, true ); ). However, quickly FMOD generates an error telling me that the sound handle is invalid (FMOD_ERR_INVALID_HANDLE). The error seems to be random but it’s only a matter of seconds (less that 20 sounds/events played). I handle the "stolen" case in my callback and it never happens.

Are there any other cases where a handle becomes invalid ?

Note that the sound is off course not loaded with the FMOD_EVENT_INFOONLY flag.

Any idea where it comes from ?

Thank you,
Sebastien

  • You must to post comments
0
0

Ok, here is the main part of a post of mine in another topic :
[quote:3c5emkxi]
In the documentation, it is not very clear what freeEventData really does. Does it free the data of the event instance passed as parameter or the data of the event itself ? The documentation isn’t really precise about events and events instances.

Anyway, when I’m done with an event instance, how can I free / release it ?

[ EDIT ]
And what about events retrieved with the FMOD_EVENT_INFOONLY flag ? Do I need to free them ?
[ /EDIT ]
[/quote:3c5emkxi]

It seems that freeEventData releases ALL the instances of an event. So, how can I free / release a specific instance so that FMOD knows he can re-use it later (without "stoling" it) ?

Again, I think the documentation could be more precise about when functions are related to events or events instances (as in order to understand the above, I had to link to the log-enabled library and analyze the produced log).

[ EDIT ]
So, when are event instances released ? When starting an event instance, must I consider that when stop will be called or when it is finished, it is released ?
[ /EDIT ]

Thanks,
Sebastien

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.