carb::audio::framesToMilliseconds

Defined in carb/audio/AudioUtils.h

inline size_t carb::audio::framesToMilliseconds(size_t frames, const SoundFormat *format)

converts a frame count at a given frame rate to a time in milliseconds.

Parameters
  • frames[in] the frame count to be converted.

  • format[in] the format information block for the sound data this time is being converted for.

Returns

the time in milliseconds associated with the given number of frames playing at the requested frame rate.