Get length/duration of Programmer Instrument audio table loaded sound

As the title says, I need to know the length of a sound (from an audio table) that is being called in an Event with a Programmer Instrument.

I’m using Programmer Instruments just like in the Unity example:

Any help very appreciated!

Calling createSound with the info from getSoundInfo will open an FSB, after which you need to call getSubSound. Then you should be able to get the length of this sound.

(After createSound) FMOD.Sound subSound; dialogueSound.getSubSound(dialogueSoundInfo.subsoundIndex, out subSound); uint length = 0; subSound.getLength(out length, FMOD.TIMEUNIT.MS);
1 Like