X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fplugin_eq_gui.cc;h=1fa5d2d598e6250216233baf5b937ebf7833cd52;hb=dac57703ccd7205ac94c14b407b802a69f4187f1;hp=306746d55666614175e74b7577ad243f74996320;hpb=943bcc29cc05bc1d75df505cd259659a72dc56b1;p=ardour.git diff --git a/gtk2_ardour/plugin_eq_gui.cc b/gtk2_ardour/plugin_eq_gui.cc index 306746d556..1fa5d2d598 100644 --- a/gtk2_ardour/plugin_eq_gui.cc +++ b/gtk2_ardour/plugin_eq_gui.cc @@ -18,19 +18,17 @@ */ +#include #include -#include #ifdef COMPILER_MSVC #include /* 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 @@ -40,6 +38,7 @@ #include "ardour/audio_buffer.h" #include "ardour/data_type.h" #include "ardour/chan_mapping.h" +#include "ardour/plugin_insert.h" #include "ardour/session.h" #include "plugin_eq_gui.h" @@ -80,10 +79,7 @@ PluginEqGui::PluginEqGui(boost::shared_ptr pluginInsert) // dB selection dBScaleModel = Gtk::ListStore::create(dBColumns); - /* this grotty-looking cast allows compilation against gtkmm 2.24.0, which - added a new ComboBox constructor. - */ - dBScaleCombo = new Gtk::ComboBox ((Glib::RefPtr &) dBScaleModel); + dBScaleCombo = new Gtk::ComboBox (dBScaleModel, false); dBScaleCombo->set_title (_("dB scale")); #define ADD_DB_ROW(MIN,MAX,STEP,NAME) \ @@ -331,7 +327,7 @@ PluginEqGui::run_impulse_analysis() { /* Allocate some thread-local buffers so that Plugin::connect_and_run can use them */ ARDOUR_UI::instance()->get_process_buffers (); - + uint32_t inputs = _plugin->get_info()->n_inputs.n_audio(); uint32_t outputs = _plugin->get_info()->n_outputs.n_audio(); @@ -346,6 +342,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 +774,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; }