add queen mary DSP library
[ardour.git] / gtk2_ardour / plugin_eq_gui.cc
index 601e45d9097c4be40239d2366948ee3df73a753a..21ec8379928986f26157eb83053f67e27c39aa75 100644 (file)
@@ -35,6 +35,8 @@
 #include <iostream>
 #include <cmath>
 
+using namespace ARDOUR;
+
 PluginEqGui::PluginEqGui(boost::shared_ptr<ARDOUR::PluginInsert> pluginInsert)
        : _min_dB(-12.0),
          _max_dB(+12.0),
@@ -72,7 +74,7 @@ PluginEqGui::PluginEqGui(boost::shared_ptr<ARDOUR::PluginInsert> pluginInsert)
        dBScaleModel = Gtk::ListStore::create(dBColumns);
 
        dBScaleCombo = new Gtk::ComboBox(dBScaleModel);
-       dBScaleCombo -> set_title("dB scale");
+       dBScaleCombo->set_title (_("dB scale"));
 
 #define ADD_DB_ROW(MIN,MAX,STEP,NAME) \
        { \
@@ -96,14 +98,14 @@ PluginEqGui::PluginEqGui(boost::shared_ptr<ARDOUR::PluginInsert> pluginInsert)
 
        dBScaleCombo -> signal_changed().connect( sigc::mem_fun(*this, &PluginEqGui::change_dB_scale) );
 
-       Gtk::Label *dBComboLabel = new Gtk::Label("dB scale");
+       Gtk::Label *dBComboLabel = new Gtk::Label (_("dB scale"));
 
        Gtk::HBox *dBSelectBin = new Gtk::HBox(false, 5);
        dBSelectBin->add( *manage(dBComboLabel));
        dBSelectBin->add( *manage(dBScaleCombo));
 
        // Phase checkbutton
-       _phase_button = new Gtk::CheckButton("Show phase");
+       _phase_button = new Gtk::CheckButton (_("Show phase"));
        _phase_button->set_active(true);
        _phase_button->signal_toggled().connect( sigc::mem_fun(*this, &PluginEqGui::redraw_scales));
 
@@ -315,8 +317,8 @@ PluginEqGui::run_impulse_analysis()
        ARDOUR::ChanMapping in_map(_plugin->get_info()->n_inputs);
        ARDOUR::ChanMapping out_map(_plugin->get_info()->n_outputs);
 
-       _plugin->connect_and_run(_bufferset, in_map, out_map, _buffer_size, (nframes_t)0);
-       nframes_t f = _plugin->signal_latency();
+       _plugin->connect_and_run(_bufferset, in_map, out_map, _buffer_size, 0);
+       framecnt_t f = _plugin->signal_latency ();
        // Adding user_latency() could be interesting
 
        // Gather all output, taking latency into account.
@@ -338,8 +340,8 @@ PluginEqGui::run_impulse_analysis()
        } else {
                //int C = 0;
                //std::cerr << (++C) << ": latency is " << f << " frames, doing split processing.." << std::endl;
-               nframes_t target_offset = 0;
-               nframes_t frames_left = _buffer_size; // refaktoroi
+               framecnt_t target_offset = 0;
+               framecnt_t frames_left = _buffer_size; // refaktoroi
                do {
                        if (f >= _buffer_size) {
                                //std::cerr << (++C) << ": f (=" << f << ") is larger than buffer_size, still trying to reach the actual output" << std::endl;
@@ -351,7 +353,7 @@ PluginEqGui::run_impulse_analysis()
                                //             we start at output offset "f"
                                //             .. and copy "buffer size" - "f" - "offset" frames
 
-                               nframes_t length = _buffer_size - f - target_offset;
+                               framecnt_t length = _buffer_size - f - target_offset;
 
                                //std::cerr << (++C) << ": copying " << length << " frames to _collect_bufferset.get_audio(i)+" << target_offset << " from bufferset at offset " << f << std::endl;
                                for (uint32_t i = 0; i < outputs; ++i) {
@@ -374,7 +376,7 @@ PluginEqGui::run_impulse_analysis()
 
                                in_map  = ARDOUR::ChanMapping(_plugin->get_info()->n_inputs);
                                out_map = ARDOUR::ChanMapping(_plugin->get_info()->n_outputs);
-                               _plugin->connect_and_run(_bufferset, in_map, out_map, _buffer_size, (nframes_t)0);
+                               _plugin->connect_and_run(_bufferset, in_map, out_map, _buffer_size, 0);
                        }
                } while ( frames_left > 0);