14namespace tracktion {
inline namespace graph
51 bool isPlayHeadRunning =
false, playheadJumped =
false, lastBlockOfLoop =
false, firstBlockOfLoop =
false;
54 std::chrono::system_clock::time_point lastUserInteractionTime;
61 const bool isPlayingNow = playHead.
isPlaying();
70 if (isPlayingNow != isPlayHeadRunning)
72 isPlayHeadRunning = isPlayingNow;
73 jumped = jumped || isPlayHeadRunning;
76 playheadJumped = jumped;
87 firstBlockOfLoop =
false;
89 firstBlockOfLoop = startTimelinePos == timelineLoopRange.getStart();
91 lastBlockOfLoop = endTimelinePos == timelineLoopRange.getEnd();
95 firstBlockOfLoop =
false;
96 lastBlockOfLoop =
false;
constexpr ValueType getStart() const noexcept
constexpr ValueType getEnd() const noexcept
Determines how this block releates to other previous render blocks and if the play head has jumped in...
bool isLastBlockOfLoop() noexcept
Returns true if this is the last block of a loop.
bool isContiguousWithPreviousBlock() noexcept
Returns true if the play head did not jump and this block is contiguous with the previous block.
bool isFirstBlockOfLoop() noexcept
Returns true if this is the first block of a loop.
void update(juce::Range< int64_t > referenceSampleRange)
Call once per block to update the jumped state.
bool didPlayheadJump() noexcept
Returns true if the play head jumped.
Converts a monotonically increasing reference range in to a timeline range.
std::chrono::system_clock::time_point getLastUserInteractionTime() const
Returns the time of the last user interaction, either a setPosition or setUserIsDragging call.
bool isRollingIntoLoop() const noexcept
Returns true is the play head is looping but playing before the loop start position.
int64_t referenceSamplePositionToTimelinePosition(int64_t referenceSamplePosition) const
Converts a reference sample position to a timeline position.
juce::Range< int64_t > getLoopRange() const noexcept
Returns the looped playback range.
bool isPlaying() const noexcept
Returns true is the play head is currently playing.
bool isLooping() const noexcept
Returns true is the play head is in loop mode.