Skip to content

Commit

Permalink
Set the loop points in juce::AudioPlayHead::PositionInfo (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
asimilon authored Jul 17, 2024
1 parent 4491bc3 commit 24e70f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/wrapper/clap-juce-wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,11 @@ class ClapJuceWrapper : public clap::helpers::Plugin<
CLAP_BEATTIME_FACTOR);
posinfo.setPpqPositionOfLastBarStart(1.0 * (double)transportInfo->bar_start /
CLAP_BEATTIME_FACTOR);
juce::AudioPlayHead::LoopPoints loopPoints {
1.0 * (double) transportInfo->loop_start_beats / CLAP_BEATTIME_FACTOR,
1.0 * (double) transportInfo->loop_end_beats / CLAP_BEATTIME_FACTOR
};
posinfo.setLoopPoints(loopPoints);
}
if (flags & CLAP_TRANSPORT_HAS_SECONDS_TIMELINE)
{
Expand Down

0 comments on commit 24e70f7

Please sign in to comment.