From 5215baba29e0ff8ce6296e7362d3753512aea2b7 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 6 Sep 2020 12:30:08 +0100 Subject: [PATCH] Double-resolution tick for carla-lv2 plugin Signed-off-by: falkTX --- source/utils/CarlaLv2Utils.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/utils/CarlaLv2Utils.hpp b/source/utils/CarlaLv2Utils.hpp index b3e22a9d9..7fe232e9c 100644 --- a/source/utils/CarlaLv2Utils.hpp +++ b/source/utils/CarlaLv2Utils.hpp @@ -1015,12 +1015,12 @@ public: const double rest = std::fmod(fLastPositionData.barBeat, 1.0f); fTimeInfo.bbt.beat = static_cast(static_cast(fLastPositionData.barBeat)-rest+1.0); - fTimeInfo.bbt.tick = static_cast(rest*fTimeInfo.bbt.ticksPerBeat+0.5); + fTimeInfo.bbt.tick = rest * fTimeInfo.bbt.ticksPerBeat; if (fLastPositionData.bar_f >= 0.0f) { fLastPositionData.bar_f += std::floor((fLastPositionData.barBeat+static_cast(addedBarBeats))/ - fLastPositionData.beatsPerBar); + fLastPositionData.beatsPerBar); if (fLastPositionData.bar_f <= 0.0f) {