0
0

How to convert FMOD_TIMEUNIT_PCMBYTES in to Total Time MS or Samples?

result = FMOD_Sound_GetLength(Sound, Length, FMOD_TIMEUNIT_PCMBYTES)

Does anybody can me to help?

Lindomar

  • You must to post comments
0
0

please read the documentation it has it all listed for you.

from the terminology / basic concepts section

ms = samples * 1000 / samplerate.
samples = ms * samplerate / 1000.
samplerate = samples * 1000 / ms.
bytes = samples * bits * channels / 8.
samples = bytes * 8 / bits / channels.

  • You must to post comments
0
0

Actually why do you need to convert it when you could simply use FMOD_TIMEUNIT_MS?

  • You must to post comments
0
0

[quote="brett":7doxtc0g]Actually why do you need to convert it when you could simply use FMOD_TIMEUNIT_MS?[/quote:7doxtc0g]

To use with soud::readData in the example offlinedecode.
When the loop comes back me zero I mark the position in I transform in time.

Another form exists to obtain that time in sound::readData?

Lindomar

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.