Skip to content

Commit

Permalink
fix #23933: fixed rounding error
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanPudashkin committed Aug 9, 2024
1 parent 0d4d8be commit 4b4c93c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/engraving/playback/renderers/tremolorenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,12 @@ void TremoloRenderer::doRender(const EngravingItem* item, const mpe::Articulatio
}

// ... and use that here
int stepsCount = overallDurationTicks / stepDurationTicks;
const int stepsCount = std::round(overallDurationTicks / (float)stepDurationTicks);
if (stepsCount == 0) {
return;
}

stepDurationTicks = overallDurationTicks / stepsCount;

if (tremolo.two) {
const Chord* firstTremoloChord = tremolo.two->chord1();
Expand Down

0 comments on commit 4b4c93c

Please sign in to comment.