0
0

I wanted to have a callback when an event terminates, but I see a few problems. I had a question about the intent of EVENT_CALLBACKTYPE_EVENTFINISHED.

  1. EVENT_CALLBACKTYPE_EVENTFINISHED is only triggered by a terminating parameter. This means events that have the new "one shot" property, will not fire this event even though the event finishes. Watching for EVENT_CALLBACKTYPE_SOUNDDEF_END would work for one-shot events, but not a general solution.

  2. I’ve found cases where the callback would never get called. I play an event with a eventfinished callback. I then play another event that triggers a synchronous sound bank load, the first event appears to finish during the load, and the callback is never invoked.

Point 2 was more as fyi. Asynchronous loading and preloading is preferred in normal cases. I was more concerned with looking for a reliable event finished notification.

Does it makes sense to have a callback when the event is no longer active or do you believe polling a playing status is more appropriate.

Best regards,
Michael Marks.

  • You must to post comments
0
0

EVENT_CALLBACKTYPE_EVENTFINISHED is triggered by events with the "Oneshot" property.

As for the callback not being called when a synchronous bank load is occurring, I’ll check that out.

Cheers,

  • You must to post comments
0
0

I noticed Event::stop won’t propogate a EVENT_CALLBACKTYPE_EVENTFINISHED notification (or any other callback event for that matter). This is fine, I can just trigger the notification myself at the point I call Event::stop, was just wondering if this is intentional or not. Specifically is there any chance in future Event::stop will begin generating some kind of complete notification. Code could easily misbehave if it receives two consecutive EVENT_CALLBACKTYPE_EVENTFINISHED notifications, one I generate, and one from FMOD – I’d hate to see bugs introduced from this.

  • You must to post comments
0
0

As of 4.07.17 (released 5/06/07) Event::stop has triggered an EVENT_CALLBACKTYPE_EVENTFINISHED. If you’re talking about stable branch then don’t worry we won’t be changing the callback behaviour from what it is now.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.