From 90c899407afce9d6d8370586e7bdbac0d1415563 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 30 Oct 2013 18:01:45 +0100 Subject: ReplayGainInfo: use large negative value instead of infinity The last piece to allow -ffast-math. --- src/ReplayGainInfo.cxx | 2 ++ src/ReplayGainInfo.hxx | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/ReplayGainInfo.cxx b/src/ReplayGainInfo.cxx index 7ee788e04..cf6b0ba69 100644 --- a/src/ReplayGainInfo.cxx +++ b/src/ReplayGainInfo.cxx @@ -20,6 +20,8 @@ #include "config.h" #include "ReplayGainInfo.hxx" +#include + float ReplayGainTuple::CalculateScale(float preamp, float missing_preamp, bool peak_limit) const diff --git a/src/ReplayGainInfo.hxx b/src/ReplayGainInfo.hxx index 8846a6ed3..b8dfd16a1 100644 --- a/src/ReplayGainInfo.hxx +++ b/src/ReplayGainInfo.hxx @@ -23,8 +23,6 @@ #include "check.h" #include "Compiler.h" -#include - enum ReplayGainMode { REPLAY_GAIN_AUTO = -2, REPLAY_GAIN_OFF, @@ -37,13 +35,13 @@ struct ReplayGainTuple { float peak; void Clear() { - gain = INFINITY; + gain = -200; peak = 0.0; } gcc_pure bool IsDefined() const { - return !std::isinf(gain); + return gain > -100; } gcc_pure -- cgit v1.2.3