From d051deb04b57f33edcc03a0319d91d8bf2190edc Mon Sep 17 00:00:00 2001
From: Owen Williams <owilliams@mixxx.org>
Date: Sun, 25 Sep 2022 18:34:08 -0400
Subject: [PATCH] Use rate_ratio for track timing

This prevents wild numbers from appearing during scratching under vinyl control.
---
 src/engine/enginebuffer.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/engine/enginebuffer.cpp b/src/engine/enginebuffer.cpp
index 83885094249..888c613cb99 100644
--- a/src/engine/enginebuffer.cpp
+++ b/src/engine/enginebuffer.cpp
@@ -1274,8 +1274,8 @@ void EngineBuffer::updateIndicators(double speed, int iBufferSize) {
 
     const double fFractionalPlaypos = fractionalPlayposFromAbsolute(m_filepos_play);
 
-    const double tempoTrackSeconds = m_trackSamplesOld / kSamplesPerFrame
-            / m_trackSampleRateOld / m_tempo_ratio_old;
+    const double tempoTrackSeconds = m_trackSamplesOld / kSamplesPerFrame /
+            m_trackSampleRateOld / getRateRatio();
     if (speed > 0 && fFractionalPlaypos == 1.0) {
         // At Track end
         speed = 0;