carb::audio::framesToMilliseconds

Defined in carb/audio/AudioUtils.h

constexpr size_t carb::audio::framesToMilliseconds(size_t frames, size_t frameRate)

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

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

  • frameRate[in] the frame rate of the audio that needs a time calculated.

Returns

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