Skip to content

Commit 62713b1

Browse files
refactor: simplify bar phase formula
1 parent 6406a61 commit 62713b1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

plugins/Cardinal/src/HostTime.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ struct HostTime : TerminalModule {
160160
: 0.0f;
161161
const float barPhase = playingWithBBT && pcontext->beatsPerBar > 0
162162
? fmod(
163-
(timeInfo.bar - 1) + (timeInfo.beat - 1) / (float)pcontext->beatsPerBar + beatPhase / (float)pcontext->beatsPerBar,
163+
(timeInfo.bar - 1) + ((timeInfo.beat - 1) + beatPhase) / (float)pcontext->beatsPerBar,
164164
(float)barDivision
165165
) / (float)barDivision
166166
: 0.0f;

0 commit comments

Comments
 (0)