Answered
0
0

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:
https://www.fmod.com/resources/documentation-api?page=content/generated/engine_new_unity/script_example_programmersounds.html#/

Any help very appreciated!

  • You must to post comments
Best Answer
1
0

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);

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.