save-as: default to current session name.
[ardour.git] / gtk2_ardour / plugin_eq_gui.cc
index 306746d55666614175e74b7577ad243f74996320..09e72acb92b0e587955a8c6ebe2d086d7ced9b64 100644 (file)
 
 */
 
+#include <math.h>
 #include <iostream>
-#include <cmath>
 
 #ifdef COMPILER_MSVC
 #include <float.h>
 /* isinf() & isnan() are C99 standards, which older MSVC doesn't provide */
-#define isinf(val) !((bool)_finite((double)val))
-#define isnan(val) (bool)_isnan((double)val)
-#endif
-
-#ifdef __APPLE__
-#define isinf(val) std::isinf((val))
-#define isnan(val) std::isnan((val))
+#define ISINF(val) !((bool)_finite((double)val))
+#define ISNAN(val) (bool)_isnan((double)val)
+#else
+#define ISINF(val) std::isinf((val))
+#define ISNAN(val) std::isnan((val))
 #endif
 
 #include <gtkmm/box.h>
@@ -346,6 +344,7 @@ PluginEqGui::run_impulse_analysis()
        ARDOUR::ChanMapping in_map(_plugin->get_info()->n_inputs);
        ARDOUR::ChanMapping out_map(_plugin->get_info()->n_outputs);
 
+       _plugin->set_block_size (_buffer_size);
        _plugin->connect_and_run(_bufferset, in_map, out_map, _buffer_size, 0);
        framecnt_t f = _plugin->signal_latency ();
        // Adding user_latency() could be interesting
@@ -777,13 +776,13 @@ PluginEqGui::plot_signal_amplitude_difference(Gtk::Widget *w, cairo_t *cr)
                }
                */
 
-               if (isinf(power)) {
+               if (ISINF(power)) {
                        if (power < 0) {
                                power = _min_dB - 1.0;
                        } else {
                                power = _max_dB - 1.0;
                        }
-               } else if (isnan(power)) {
+               } else if (ISNAN(power)) {
                        power = _min_dB - 1.0;
                }