Browse Source

Fix shaky TimeBeat (#44)

pull/45/head
Patrick Desaulniers Filipe Coelho <falktx@falktx.com> 5 years ago
parent
commit
a50ea2140b
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      distrho/src/DistrhoPluginLV2.cpp

+ 2
- 2
distrho/src/DistrhoPluginLV2.cpp View File

@@ -387,7 +387,7 @@ public:
if (fLastPositionData.barBeat >= 0.0f)
{
const double rest = std::fmod(fLastPositionData.barBeat, 1.0f);
fTimePosition.bbt.beat = fLastPositionData.barBeat-rest+1.0;
fTimePosition.bbt.beat = std::round(fLastPositionData.barBeat-rest+1.0);
fTimePosition.bbt.tick = rest*fTimePosition.bbt.ticksPerBeat+0.5;
}
}
@@ -580,7 +580,7 @@ public:
(double)fLastPositionData.beatsPerBar);

const double rest = std::fmod(fLastPositionData.barBeat, 1.0f);
fTimePosition.bbt.beat = fLastPositionData.barBeat-rest+1.0;
fTimePosition.bbt.beat = std::round(fLastPositionData.barBeat-rest+1.0);
fTimePosition.bbt.tick = rest*fTimePosition.bbt.ticksPerBeat+0.5;

if (fLastPositionData.bar >= 0)


Loading…
Cancel
Save