Browse Source

Fix last commit

Signed-off-by: falkTX <falktx@falktx.com>
pull/1807/head
falkTX 1 year ago
parent
commit
1b5f7e9f35
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      source/backend/plugin/CarlaPluginCLAP.cpp

+ 2
- 1
source/backend/plugin/CarlaPluginCLAP.cpp View File

@@ -2058,11 +2058,12 @@ public:
CARLA_SAFE_ASSERT_INT(timeInfo.bbt.bar > 0, timeInfo.bbt.bar);
CARLA_SAFE_ASSERT_INT(timeInfo.bbt.beat > 0, timeInfo.bbt.beat);

const double barStart = static_cast<double>(timeInfo.bbt.beatsPerBar) * (timeInfo.bbt.bar - 1);
const double positionBeats = static_cast<double>(timeInfo.frame)
/ (sampleRate * 60 / timeInfo.bbt.beatsPerMinute);

// Bar/Beats
clapTransport.bar_start = static_cast<double>(timeInfo.bbt.beatsPerBar) * (timeInfo.bbt.bar - 1);
clapTransport.bar_start = std::round(CLAP_BEATTIME_FACTOR * barStart);
clapTransport.bar_number = timeInfo.bbt.bar - 1;
clapTransport.song_pos_beats = std::round(CLAP_BEATTIME_FACTOR * positionBeats);
clapTransport.flags |= CLAP_TRANSPORT_HAS_BEATS_TIMELINE;


Loading…
Cancel
Save