Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

engine/vinylcontrolcontrol: Fix precision loss (wrong use of int) #3127

Merged
merged 1 commit into from
Sep 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/engine/vinylcontrolcontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void VinylControlControl::slotControlVinylSeek(double fractionalPos) {
}

double shortest_distance = 0;
int nearest_playpos = -1;
double nearest_playpos = -1;

const QList<CuePointer> cuePoints(pTrack->getCuePoints());
QListIterator<CuePointer> it(cuePoints);
Expand All @@ -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)) {
Expand Down