Returns a textual description of a CurrentPositionInfo
| 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 | //============================================================================== |
no test coverage detected