Commit 90c89940 authored by Max Kellermann's avatar Max Kellermann

ReplayGainInfo: use large negative value instead of infinity

The last piece to allow -ffast-math.
parent 55868eec
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#include "config.h" #include "config.h"
#include "ReplayGainInfo.hxx" #include "ReplayGainInfo.hxx"
#include <math.h>
float float
ReplayGainTuple::CalculateScale(float preamp, float missing_preamp, ReplayGainTuple::CalculateScale(float preamp, float missing_preamp,
bool peak_limit) const bool peak_limit) const
......
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
#include "check.h" #include "check.h"
#include "Compiler.h" #include "Compiler.h"
#include <cmath>
enum ReplayGainMode { enum ReplayGainMode {
REPLAY_GAIN_AUTO = -2, REPLAY_GAIN_AUTO = -2,
REPLAY_GAIN_OFF, REPLAY_GAIN_OFF,
...@@ -37,13 +35,13 @@ struct ReplayGainTuple { ...@@ -37,13 +35,13 @@ struct ReplayGainTuple {
float peak; float peak;
void Clear() { void Clear() {
gain = INFINITY; gain = -200;
peak = 0.0; peak = 0.0;
} }
gcc_pure gcc_pure
bool IsDefined() const { bool IsDefined() const {
return !std::isinf(gain); return gain > -100;
} }
gcc_pure gcc_pure
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment