MCPcopy Create free account
hub / github.com/DISTRHO/DPF / getTextBufTime

Function getTextBufTime

examples/Info/InfoExampleUI.cpp:247–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245 }
246
247 const char* getTextBufTime(const uint64_t frame)
248 {
249 const uint32_t time = frame / uint64_t(fSampleRate);
250 const uint32_t secs = time % 60;
251 const uint32_t mins = (time / 60) % 60;
252 const uint32_t hrs = (time / 3600) % 60;
253 std::snprintf(fStrBuf, 0xff, "%02i:%02i:%02i", hrs, mins, secs);
254 return fStrBuf;
255 }
256
257 // helpers for drawing text
258 void drawLeft(float x, const float y, const char* const text, const int offset = 0)

Callers 1

onNanoDisplayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected