Hi everyone,
I’m working on a project using Unity and FMOD that supports multiple languages and includes nearly 100 games with VO events. Each VO event contains multiple tracks configured using Multi-Instrument modules. We are using a manual localization method: inside each VO event, we’ve added two tracks (e.g., ENG and TUR), and we use a continuous parameter to control which one is actually playing via volume automation.
I’ve previously read that FMOD’s built-in localization system doesn’t work well when localization is handled via labeled parameters and Multi-Instrument setups like this (Localized VO System).
Here’s the issue:
When trying to get the actual duration of the currently playing sound inside an EventInstance, FMOD seems to return the total duration of the event or the entire Multi-Instrument group — not just the currently audible segment. Moreover, the stopped callback is only triggered once the entire track ends, not the individual playing instrument.
To work around this, after starting the event I wait a few frames, then use getChannelGroup() to inspect the sub groups. I check which one has volume > 0 to detect the currently playing track, and then I try to retrieve the playing sound and get its duration via Sound.getLength.
This works in some cases, but when localization tracks are set up using Multi-Instruments, it still returns the full track length rather than the specific playing variation.
So my question is:
Is there a reliable way to get the duration of only the currently playing instrument inside a Multi-Instrument setup — or at least receive a callback when only that instrument finishes playing, not the full group?
Any tips or alternative approaches would be much appreciated!
Thanks in advance.