Engine pause/resume events in native extensions (SOLVED)

As @Pkeod pointed out, FMOD sound doesn’t pause when the rest of the engine pauses (in fact, the fact that it works at all is only sheer luck because FMOD expects us to call its update function periodically, but the engine is paused, so no update is being called). The problem is that I don’t know when to properly pause FMOD because I don’t have a NE event that tells me “the engine will now stop / has resumed”.

EVENT_ID_ACTIVATEAPP and EVENT_ID_DEACTIVATEAPP are not usable for this purpose because they also get fired when the window focus is lost (at least on macOS), which doesn’t cause an engine pause (only minimise causes engine pause on macOS).

3 Likes

Thanks. We’ll discuss this and see what can be done for the next sprint.

4 Likes

Created Issue-#4385

2 Likes

I’ve added two new extension events: EVENT_ID_ICONIFYAPP and EVENT_ID_DEICONIFYAPP. There is also two new window.set_listener() events.

This will end up in 1.2.166.

4 Likes

Solved in 1.2.166

1 Like