From d531e8a2f8280277003f67932978439b8f6a2adf Mon Sep 17 00:00:00 2001 From: David Bailes Date: Fri, 17 Jan 2020 10:06:27 +0000 Subject: [PATCH] Fix Linux build. Problem caused by my commit: 64079c3. DBL_MAX was not declared. --- src/Mix.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Mix.cpp b/src/Mix.cpp index 1f9a90d37..4ce9a63aa 100644 --- a/src/Mix.cpp +++ b/src/Mix.cpp @@ -774,14 +774,15 @@ void Mixer::SetSpeedForKeyboardScrubbing(double speed, double startTime) // Check if the direction has changed if ((speed > 0.0 && mT1 < mT0) || (speed < 0.0 && mT1 > mT0)) { - // It's safe to use 0 and DBL_MAX, because Mixer::MixVariableRates() - // doesn't sample past the start or end of the audio in a track. + // It's safe to use 0 and std::numeric_limits::max(), + // because Mixer::MixVariableRates() doesn't sample past the start + // or end of the audio in a track. if (speed > 0.0 && mT1 < mT0) { mT0 = 0; - mT1 = DBL_MAX; + mT1 = std::numeric_limits::max(); } else { - mT0 = DBL_MAX; + mT0 = std::numeric_limits::max(); mT1 = 0; }