Skip to content

Commit

Permalink
Fix implicit conversion of double to int
Browse files Browse the repository at this point in the history
  • Loading branch information
danferns committed Aug 12, 2024
1 parent 253c237 commit 5132d07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/track/keyutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ double KeyUtils::trackSimilarity(mixxx::track::io::key::ChromaticKey key1,
// relative pitch difference between tracks, when played at same tempo
const double pitchDiff = trackSyncPitchDifference(key1, bpm1, key2, bpm2);

const int roundedPitchDiff = normalizePitch(round(pitchDiff));
const int roundedPitchDiff = (int)normalizePitch(round(pitchDiff));
double cents = abs(roundedPitchDiff - pitchDiff);
// bring cents value back to [0-0.5] for pitchDiff values > 11.50
if (cents > 11) {
Expand Down

0 comments on commit 5132d07

Please sign in to comment.