From 5546a42a923335b9c2b8c635232bb70fb406b56c Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Fri, 25 Sep 2020 22:47:55 +0200 Subject: [PATCH] engine/vinylcontrolcontrol: Fix precision loss (wrong use of int) --- src/engine/vinylcontrolcontrol.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/vinylcontrolcontrol.cpp b/src/engine/vinylcontrolcontrol.cpp index 31248dd494a..940d08bd79b 100644 --- a/src/engine/vinylcontrolcontrol.cpp +++ b/src/engine/vinylcontrolcontrol.cpp @@ -117,7 +117,7 @@ void VinylControlControl::slotControlVinylSeek(double fractionalPos) { } double shortest_distance = 0; - int nearest_playpos = -1; + double nearest_playpos = -1; const QList cuePoints(pTrack->getCuePoints()); QListIterator it(cuePoints); @@ -127,7 +127,7 @@ void VinylControlControl::slotControlVinylSeek(double fractionalPos) { continue; } - int cue_position = pCue->getPosition(); + double cue_position = pCue->getPosition(); // pick cues closest to new_playpos if ((nearest_playpos == -1) || (fabs(new_playpos - cue_position) < shortest_distance)) {