Sorry for the delayed response!
What you’re likely running into is the asynchronous nature of how the FMOD Studio system operates. When called, almost all API commands, including EventInstance.setPaused()
, are enqueued in a buffer that is submitted to the Studio system to execute asynchronously when Studio.System.update() is called. The default update period is 20ms, meaning that would explain the drift you’re running into.
However, by accessing an EventInstance’s underlying ChannelGroup as detailed in the thread you linked, you can make these calls synchronously - notably getting the DSP clock for sample accurate timing info, and calling ChannelControl.setPaused(). I’d recommend trying this method of pausing out and seeing whether it resolves your issue. It’s worth noting however that due to the way the Studio and Core API interact, you’ll likely also need to call EventInstance.setPaused()
on the event instance at the same time as calling ChannelControl.setPaused()
to ensure that the pause states remain in sync.