0
0

Has anyone had trouble getting the duration of a programmer selected sound??

If I create an event that uses a sound in a layer, then the correct duration is returned.

When the event uses a programmer selected sound definition, the duration is "-1" as if it is a looping sound.

Thanks,
Matt

  • You must to post comments
0
0

Yep. Because it’s programmer selected, it’s of unknown length as far as FMOD is concerned.

FWIW, we ran into that same issue, and the only solution I could come up with was to add an optional parameter to our GetDuration() function (which was the data needed to fetch the programmer sound). If that optional argument was passed in, instead of calling Event::getDuration() I did the various work to dig up the FMOD::Sound* and get the duration off of that. Eventually that FMOD::Sound* access was replaced with a table of lengths we computed offline, but the main idea was the same.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.