From b2862c90882338d1e1d377b155105a387731dbf7 Mon Sep 17 00:00:00 2001 From: Paul Ferrand Date: Wed, 18 Dec 2019 00:26:55 +0100 Subject: [PATCH] Avoid a promotion to double --- src/sfizz/Region.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sfizz/Region.cpp b/src/sfizz/Region.cpp index edbfd06c..811fe60b 100644 --- a/src/sfizz/Region.cpp +++ b/src/sfizz/Region.cpp @@ -720,7 +720,7 @@ float crossfadeOut(const sfz::Range& crossfadeRange, U value, SfzCrossfadeCur else if (value > crossfadeRange.getStart()) { const auto crossfadePosition = static_cast(value - crossfadeRange.getStart()) / std::max(static_cast(crossfadeRange.length()), 1.0f); if (curve == SfzCrossfadeCurve::power) - return sqrt(1 - crossfadePosition); + return std::sqrt(1 - crossfadePosition); if (curve == SfzCrossfadeCurve::gain) return 1 - crossfadePosition; }