MCPcopy Create free account
hub / github.com/Tracktion/tracktion_engine / getTimecodeDisplay

Function getTimecodeDisplay

examples/common/Utilities.h:75–94  ·  view source on GitHub ↗

Returns a textual description of a CurrentPositionInfo

Source from the content-addressed store, hash-verified

73
74 // Returns a textual description of a CurrentPositionInfo
75 static inline String getTimecodeDisplay (const AudioPlayHead::CurrentPositionInfo& pos)
76 {
77 MemoryOutputStream displayText;
78
79 displayText << String (pos.bpm, 2) << " bpm, "
80 << pos.timeSigNumerator << '/' << pos.timeSigDenominator
81 << " - " << timeToTimecodeString (pos.timeInSeconds)
82 << " - " << quarterNotePositionToBarsBeatsString (pos.ppqPosition,
83 pos.timeSigNumerator,
84 pos.timeSigDenominator);
85
86 if (pos.isRecording)
87 displayText << " (recording)";
88 else if (pos.isPlaying)
89 displayText << " (playing)";
90 else
91 displayText << " (stopped)";
92
93 return displayText.toString();
94 }
95}
96
97//==============================================================================

Callers 1

paintMethod · 0.85

Calls 4

StringClass · 0.85
timeToTimecodeStringFunction · 0.85
toStringMethod · 0.45

Tested by

no test coverage detected