summaryrefslogtreecommitdiff
path: root/gtk2_ardour/plugin_eq_gui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-01-10 16:07:57 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-01-10 16:07:57 -0500
commit3020b224fa2d6e1b6b8a576e8e8e211e0585f2a2 (patch)
tree314c3099bcc57d9af09d249e1e7dd8e45baca642 /gtk2_ardour/plugin_eq_gui.cc
parentd15fda6d751a465d278f477923075d4783f3b1ca (diff)
parent897fbdc652434d3aa1e67223c3c3ef7ae9be2318 (diff)
Merge windows+cc branch into cairocanvas branch. Not finished, need to now merge windows branch to get changes from there
Diffstat (limited to 'gtk2_ardour/plugin_eq_gui.cc')
-rw-r--r--gtk2_ardour/plugin_eq_gui.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/gtk2_ardour/plugin_eq_gui.cc b/gtk2_ardour/plugin_eq_gui.cc
index 631fb7be71..4bf2a5f879 100644
--- a/gtk2_ardour/plugin_eq_gui.cc
+++ b/gtk2_ardour/plugin_eq_gui.cc
@@ -18,6 +18,17 @@
*/
+#ifdef COMPILER_MSVC
+#include <float.h>
+
+// 'std::isinf()' and 'std::isnan()' are not available in MSVC.
+#define isinf(val) !((bool)_finite((double)val))
+#define isnan(val) (bool)_isnan((double)val)
+#else
+using std::isnan;
+using std::isinf;
+#endif
+
#include "plugin_eq_gui.h"
#include "fft.h"
@@ -765,13 +776,13 @@ PluginEqGui::plot_signal_amplitude_difference(Gtk::Widget *w, cairo_t *cr)
}
*/
- if (std::isinf(power)) {
+ if (isinf(power)) {
if (power < 0) {
power = _min_dB - 1.0;
} else {
power = _max_dB - 1.0;
}
- } else if (std::isnan(power)) {
+ } else if (isnan(power)) {
power = _min_dB - 1.0;
}