aboutsummaryrefslogtreecommitdiffstats
path: root/src/CrossFade.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-30 16:50:34 +0100
committerMax Kellermann <max@duempel.org>2013-10-30 16:50:34 +0100
commita65f63747b4602cf227f7c0699b01bba5f7cd8df (patch)
treeef8d37fe937904634424e942643d987f0ee8bde3 /src/CrossFade.hxx
parenta21edddf277458cbff816dcbfced3a849f380f17 (diff)
downloadmpd-a65f63747b4602cf227f7c0699b01bba5f7cd8df.tar.gz
mpd-a65f63747b4602cf227f7c0699b01bba5f7cd8df.tar.xz
mpd-a65f63747b4602cf227f7c0699b01bba5f7cd8df.zip
CrossFade: use negative value for invalid mixramp_delay
Avoid NaN to allow -ffast-math.
Diffstat (limited to '')
-rw-r--r--src/CrossFade.hxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/CrossFade.hxx b/src/CrossFade.hxx
index eb81ae152..c47db84e1 100644
--- a/src/CrossFade.hxx
+++ b/src/CrossFade.hxx
@@ -22,8 +22,6 @@
#include "Compiler.h"
-#include <cmath>
-
struct AudioFormat;
struct CrossFadeSettings {
@@ -35,14 +33,15 @@ struct CrossFadeSettings {
float mixramp_db;
/**
- * The configured MixRapm delay [s].
+ * The configured MixRapm delay [s]. A non-positive value
+ * disables MixRamp.
*/
float mixramp_delay;
CrossFadeSettings()
:duration(0),
mixramp_db(0),
- mixramp_delay(std::nanf(""))
+ mixramp_delay(-1)
{}