2 Copyright (C) 2002 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #include <ardour/io.h>
23 #include <ardour/route.h>
24 #include <ardour/route_group.h>
25 #include <ardour/session.h>
26 #include <ardour/session_route.h>
27 #include <ardour/dB.h>
29 #include <gtkmm/style.h>
30 #include <gdkmm/color.h>
31 #include <gtkmm2ext/utils.h>
32 #include <gtkmm2ext/fastmeter.h>
33 #include <gtkmm2ext/stop_signal.h>
34 #include <gtkmm2ext/barcontroller.h>
35 #include <gtkmm2ext/gtk_ui.h>
36 #include <midi++/manager.h>
37 #include <pbd/fastlog.h>
38 #include <pbd/stacktrace.h>
40 #include "ardour_ui.h"
41 #include "gain_meter.h"
44 #include "gui_thread.h"
46 #include "public_editor.h"
48 #include <ardour/session.h>
49 #include <ardour/route.h>
50 #include <ardour/meter.h>
54 using namespace ARDOUR;
56 using namespace Gtkmm2ext;
61 sigc::signal<void> GainMeterBase::ResetAllPeakDisplays;
62 sigc::signal<void,RouteGroup*> GainMeterBase::ResetGroupPeakDisplays;
64 map<string,Glib::RefPtr<Gdk::Pixmap> > GainMeter::metric_pixmaps;
65 Glib::RefPtr<Gdk::Pixbuf> GainMeter::slider;
69 GainMeter::setup_slider_pix ()
71 if ((slider = ::get_icon ("fader_belt")) == 0) {
72 throw failed_constructor();
76 GainMeterBase::GainMeterBase (Session& s,
77 const Glib::RefPtr<Gdk::Pixbuf>& pix,
80 // 0.781787 is the value needed for gain to be set to 0.
81 gain_adjustment (0.781787, 0.0, 1.0, 0.01, 0.1),
82 gain_automation_style_button (""),
83 gain_automation_state_button ("")
86 using namespace Menu_Helpers;
88 ignore_toggle = false;
90 next_release_selects = false;
95 gain_slider = manage (new HSliderController (pix,
99 gain_slider = manage (new VSliderController (pix,
104 level_meter = new LevelMeter(_session);
106 gain_slider->signal_button_press_event().connect (mem_fun(*this, &GainMeter::start_gain_touch));
107 gain_slider->signal_button_release_event().connect (mem_fun(*this, &GainMeter::end_gain_touch));
108 gain_slider->set_name ("GainFader");
110 gain_display.set_name ("MixerStripGainDisplay");
111 gain_display.set_has_frame (false);
112 set_size_request_to_display_given_text (gain_display, "-80.g", 2, 6); /* note the descender */
113 gain_display.signal_activate().connect (mem_fun (*this, &GainMeter::gain_activated));
114 gain_display.signal_focus_in_event().connect (mem_fun (*this, &GainMeter::gain_focused), false);
115 gain_display.signal_focus_out_event().connect (mem_fun (*this, &GainMeter::gain_focused), false);
117 peak_display.set_name ("MixerStripPeakDisplay");
118 // peak_display.set_has_frame (false);
119 // peak_display.set_editable (false);
120 set_size_request_to_display_given_text (peak_display, "-80.g", 2, 6); /* note the descender */
121 max_peak = minus_infinity();
122 peak_display.set_label (_("-inf"));
123 peak_display.unset_flags (Gtk::CAN_FOCUS);
125 gain_automation_style_button.set_name ("MixerAutomationModeButton");
126 gain_automation_state_button.set_name ("MixerAutomationPlaybackButton");
128 ARDOUR_UI::instance()->tooltips().set_tip (gain_automation_state_button, _("Fader automation mode"));
129 ARDOUR_UI::instance()->tooltips().set_tip (gain_automation_style_button, _("Fader automation type"));
131 gain_automation_style_button.unset_flags (Gtk::CAN_FOCUS);
132 gain_automation_state_button.unset_flags (Gtk::CAN_FOCUS);
134 gain_automation_state_button.set_size_request(15, 15);
135 gain_automation_style_button.set_size_request(15, 15);
137 gain_astyle_menu.items().push_back (MenuElem (_("Trim")));
138 gain_astyle_menu.items().push_back (MenuElem (_("Abs")));
140 gain_astate_menu.set_name ("ArdourContextMenu");
141 gain_astyle_menu.set_name ("ArdourContextMenu");
143 gain_adjustment.signal_value_changed().connect (mem_fun(*this, &GainMeterBase::gain_adjusted));
144 peak_display.signal_button_release_event().connect (mem_fun(*this, &GainMeterBase::peak_button_release), false);
145 gain_display.signal_key_press_event().connect (mem_fun(*this, &GainMeterBase::gain_key_press), false);
147 ResetAllPeakDisplays.connect (mem_fun(*this, &GainMeterBase::reset_peak_display));
148 ResetGroupPeakDisplays.connect (mem_fun(*this, &GainMeterBase::reset_group_peak_display));
150 UI::instance()->theme_changed.connect (mem_fun(*this, &GainMeterBase::on_theme_changed));
151 ColorsChanged.connect (bind(mem_fun (*this, &GainMeterBase::color_handler), false));
152 DPIReset.connect (bind(mem_fun (*this, &GainMeterBase::color_handler), true));
155 GainMeterBase::~GainMeterBase ()
162 GainMeterBase::set_io (boost::shared_ptr<IO> io)
164 cerr << this << " Clear all connections\n";
166 connections.clear ();
170 level_meter->set_io (_io);
171 gain_slider->set_controllable (_io->gain_control());
173 boost::shared_ptr<Route> r;
175 if ((r = boost::dynamic_pointer_cast<Route> (_io)) != 0) {
177 if (!r->is_hidden()) {
179 using namespace Menu_Helpers;
181 gain_astate_menu.items().clear ();
183 gain_astate_menu.items().push_back (MenuElem (_("Manual"),
184 bind (mem_fun (*_io, &IO::set_parameter_automation_state),
185 Evoral::Parameter(GainAutomation), (AutoState) Off)));
186 gain_astate_menu.items().push_back (MenuElem (_("Play"),
187 bind (mem_fun (*_io, &IO::set_parameter_automation_state),
188 Evoral::Parameter(GainAutomation), (AutoState) Play)));
189 gain_astate_menu.items().push_back (MenuElem (_("Write"),
190 bind (mem_fun (*_io, &IO::set_parameter_automation_state),
191 Evoral::Parameter(GainAutomation), (AutoState) Write)));
192 gain_astate_menu.items().push_back (MenuElem (_("Touch"),
193 bind (mem_fun (*_io, &IO::set_parameter_automation_state),
194 Evoral::Parameter(GainAutomation), (AutoState) Touch)));
196 connections.push_back (gain_automation_style_button.signal_button_press_event().connect (mem_fun(*this, &GainMeterBase::gain_automation_style_button_event), false));
197 connections.push_back (gain_automation_state_button.signal_button_press_event().connect (mem_fun(*this, &GainMeterBase::gain_automation_state_button_event), false));
199 connections.push_back (r->gain_control()->alist()->automation_state_changed.connect (mem_fun(*this, &GainMeter::gain_automation_state_changed)));
200 connections.push_back (r->gain_control()->alist()->automation_style_changed.connect (mem_fun(*this, &GainMeter::gain_automation_style_changed)));
202 gain_automation_state_changed ();
206 cerr << "Connect " << this << " to gain change for " << _io->name() << endl;
208 connections.push_back (_io->gain_control()->Changed.connect (mem_fun(*this, &GainMeterBase::gain_changed)));
212 update_gain_sensitive ();
216 GainMeterBase::hide_all_meters ()
218 level_meter->hide_meters();
222 GainMeter::hide_all_meters ()
224 bool remove_metric_area = false;
226 GainMeterBase::hide_all_meters ();
228 if (remove_metric_area) {
229 if (meter_metric_area.get_parent()) {
230 level_meter->remove (meter_metric_area);
236 GainMeterBase::setup_meters (int len)
238 level_meter->setup_meters(len, 5);
242 GainMeter::setup_meters (int len)
244 if (!meter_metric_area.get_parent()) {
245 level_meter->pack_end (meter_metric_area, false, false);
246 meter_metric_area.show_all ();
248 GainMeterBase::setup_meters (len);
252 GainMeterBase::gain_key_press (GdkEventKey* ev)
254 if (key_is_legal_for_numeric_entry (ev->keyval)) {
255 /* drop through to normal handling */
258 /* illegal key for gain entry */
263 GainMeterBase::peak_button_release (GdkEventButton* ev)
265 /* reset peak label */
267 if (ev->button == 1 && Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier|Keyboard::TertiaryModifier)) {
268 ResetAllPeakDisplays ();
269 } else if (ev->button == 1 && Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
270 boost::shared_ptr<Route> r;
272 if ((r = boost::dynamic_pointer_cast<Route> (_io)) != 0) {
273 ResetGroupPeakDisplays (r->mix_group());
276 reset_peak_display ();
283 GainMeterBase::reset_peak_display ()
285 boost::shared_ptr<Route> r;
287 if ((r = boost::dynamic_pointer_cast<Route> (_io)) != 0) {
288 r->peak_meter().reset_max();
291 level_meter->clear_meters();
292 max_peak = -INFINITY;
293 peak_display.set_label (_("-Inf"));
294 peak_display.set_name ("MixerStripPeakDisplay");
298 GainMeterBase::reset_group_peak_display (RouteGroup* group)
300 boost::shared_ptr<Route> r;
302 if ((r = boost::dynamic_pointer_cast<Route> (_io)) != 0) {
303 if (group == r->mix_group()) {
304 reset_peak_display ();
310 GainMeterBase::popup_meter_menu (GdkEventButton *ev)
312 using namespace Menu_Helpers;
314 if (meter_menu == 0) {
315 meter_menu = new Gtk::Menu;
316 MenuList& items = meter_menu->items();
318 items.push_back (MenuElem ("-inf .. +0dBFS"));
319 items.push_back (MenuElem ("-10dB .. +0dBFS"));
320 items.push_back (MenuElem ("-4 .. +0dBFS"));
321 items.push_back (SeparatorElem());
322 items.push_back (MenuElem ("-inf .. -2dBFS"));
323 items.push_back (MenuElem ("-10dB .. -2dBFS"));
324 items.push_back (MenuElem ("-4 .. -2dBFS"));
327 meter_menu->popup (1, ev->time);
331 GainMeterBase::gain_focused (GdkEventFocus* ev)
334 gain_display.select_region (0, -1);
336 gain_display.select_region (0, 0);
342 GainMeterBase::gain_activated ()
346 if (sscanf (gain_display.get_text().c_str(), "%f", &f) == 1) {
348 /* clamp to displayable values */
352 _io->gain_control()->set_value (dB_to_coefficient(f));
354 if (gain_display.has_focus()) {
355 PublicEditor::instance().reset_focus();
361 GainMeterBase::show_gain ()
365 float v = gain_adjustment.get_value();
368 strcpy (buf, _("-inf"));
370 snprintf (buf, 32, "%.1f", coefficient_to_dB (slider_position_to_gain (v)));
373 gain_display.set_text (buf);
377 GainMeterBase::gain_adjusted ()
379 cerr << this << " for " << _io->name() << " GAIN ADJUSTED\n";
380 if (!ignore_toggle) {
382 _io->gain_control()->set_value (slider_position_to_gain (gain_adjustment.get_value()));
383 cerr << "Set GC OUT\n";
389 GainMeterBase::effective_gain_display ()
391 gfloat value = gain_to_slider_position (_io->effective_gain());
393 cerr << this << " for " << _io->name() << " EGAIN = " << value << " AGAIN = " << gain_adjustment.get_value () << endl;
394 // stacktrace (cerr, 20);
396 if (gain_adjustment.get_value() != value) {
397 ignore_toggle = true;
398 gain_adjustment.set_value (value);
399 ignore_toggle = false;
404 GainMeterBase::gain_changed ()
406 Gtkmm2ext::UI::instance()->call_slot (mem_fun(*this, &GainMeterBase::effective_gain_display));
410 GainMeterBase::set_meter_strip_name (const char * name)
412 meter_metric_area.set_name (name);
416 GainMeterBase::set_fader_name (const char * name)
418 gain_slider->set_name (name);
422 GainMeterBase::update_gain_sensitive ()
424 static_cast<Gtkmm2ext::SliderController*>(gain_slider)->set_sensitive (
425 !(_io->gain_control()->alist()->automation_state() & Play));
430 next_meter_point (MeterPoint mp)
434 return MeterPreFader;
438 return MeterPostFader;
450 GainMeterBase::meter_press(GdkEventButton* ev)
452 boost::shared_ptr<Route> _route;
454 wait_for_release = false;
456 if ((_route = boost::dynamic_pointer_cast<Route>(_io)) == 0) {
460 if (!ignore_toggle) {
462 if (Keyboard::is_context_menu_event (ev)) {
464 // no menu at this time.
468 if (Keyboard::is_button2_event(ev)) {
470 // Primary-button2 click is the midi binding click
471 // button2-click is "momentary"
473 if (!Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier))) {
474 wait_for_release = true;
475 old_meter_point = _route->meter_point ();
479 if (ev->button == 1 || Keyboard::is_button2_event (ev)) {
481 if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
483 /* Primary+Tertiary-click applies change to all routes */
485 _session.begin_reversible_command (_("meter point change"));
486 Session::GlobalMeteringStateCommand *cmd = new Session::GlobalMeteringStateCommand (_session, this);
487 _session.foreach_route (this, &GainMeterBase::set_meter_point, next_meter_point (_route->meter_point()));
489 _session.add_command (cmd);
490 _session.commit_reversible_command ();
493 } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
495 /* Primary-click: solo mix group.
496 NOTE: Primary-button2 is MIDI learn.
499 if (ev->button == 1) {
500 _session.begin_reversible_command (_("meter point change"));
501 Session::GlobalMeteringStateCommand *cmd = new Session::GlobalMeteringStateCommand (_session, this);
502 set_mix_group_meter_point (*_route, next_meter_point (_route->meter_point()));
504 _session.add_command (cmd);
505 _session.commit_reversible_command ();
510 /* click: change just this route */
514 _route->set_meter_point (next_meter_point (_route->meter_point()), this);
525 GainMeterBase::meter_release(GdkEventButton* ev)
528 if (wait_for_release){
529 wait_for_release = false;
531 boost::shared_ptr<Route> r;
533 if ((r = boost::dynamic_pointer_cast<Route>(_io)) != 0) {
534 set_meter_point (*r, old_meter_point);
543 GainMeterBase::set_meter_point (Route& route, MeterPoint mp)
545 route.set_meter_point (mp, this);
549 GainMeterBase::set_mix_group_meter_point (Route& route, MeterPoint mp)
551 RouteGroup* mix_group;
553 if((mix_group = route.mix_group()) != 0){
554 mix_group->apply (&Route::set_meter_point, mp, this);
556 route.set_meter_point (mp, this);
561 GainMeterBase::meter_point_clicked ()
563 boost::shared_ptr<Route> r;
565 if ((r = boost::dynamic_pointer_cast<Route> (_io)) != 0) {
571 GainMeterBase::start_gain_touch (GdkEventButton* ev)
573 _io->gain_control()->alist()->start_touch ();
578 GainMeterBase::end_gain_touch (GdkEventButton* ev)
580 _io->gain_control()->alist()->stop_touch ();
585 GainMeterBase::gain_automation_state_button_event (GdkEventButton *ev)
587 if (ev->type == GDK_BUTTON_RELEASE) {
591 switch (ev->button) {
593 gain_astate_menu.popup (1, ev->time);
603 GainMeterBase::gain_automation_style_button_event (GdkEventButton *ev)
605 if (ev->type == GDK_BUTTON_RELEASE) {
609 switch (ev->button) {
611 gain_astyle_menu.popup (1, ev->time);
620 GainMeterBase::astate_string (AutoState state)
622 return _astate_string (state, false);
626 GainMeterBase::short_astate_string (AutoState state)
628 return _astate_string (state, true);
632 GainMeterBase::_astate_string (AutoState state, bool shrt)
638 sstr = (shrt ? "M" : _("M"));
641 sstr = (shrt ? "P" : _("P"));
644 sstr = (shrt ? "T" : _("T"));
647 sstr = (shrt ? "W" : _("W"));
655 GainMeterBase::astyle_string (AutoStyle style)
657 return _astyle_string (style, false);
661 GainMeterBase::short_astyle_string (AutoStyle style)
663 return _astyle_string (style, true);
667 GainMeterBase::_astyle_string (AutoStyle style, bool shrt)
672 /* XXX it might different in different languages */
674 return (shrt ? _("Abs") : _("Abs"));
679 GainMeterBase::gain_automation_style_changed ()
683 gain_automation_style_button.set_label (astyle_string(_io->gain_control()->alist()->automation_style()));
686 gain_automation_style_button.set_label (short_astyle_string(_io->gain_control()->alist()->automation_style()));
692 GainMeterBase::gain_automation_state_changed ()
694 ENSURE_GUI_THREAD(mem_fun(*this, &GainMeterBase::gain_automation_state_changed));
700 gain_automation_state_button.set_label (astate_string(_io->gain_control()->alist()->automation_state()));
703 gain_automation_state_button.set_label (short_astate_string(_io->gain_control()->alist()->automation_state()));
707 x = (_io->gain_control()->alist()->automation_state() != Off);
709 if (gain_automation_state_button.get_active() != x) {
710 ignore_toggle = true;
711 gain_automation_state_button.set_active (x);
712 ignore_toggle = false;
715 update_gain_sensitive ();
717 /* start watching automation so that things move */
719 gain_watching.disconnect();
722 gain_watching = ARDOUR_UI::RapidScreenUpdate.connect (mem_fun (*this, &GainMeterBase::effective_gain_display));
727 GainMeterBase::update_meters()
730 float mpeak = level_meter->update_meters();
732 if (mpeak > max_peak) {
734 if (mpeak <= -200.0f) {
735 peak_display.set_label (_("-inf"));
737 snprintf (buf, sizeof(buf), "%.1f", mpeak);
738 peak_display.set_label (buf);
742 peak_display.set_name ("MixerStripPeakDisplayPeak");
747 void GainMeterBase::color_handler(bool dpi)
749 color_changed = true;
750 dpi_changed = (dpi) ? true : false;
755 GainMeterBase::set_width (Width w, int len)
758 level_meter->setup_meters (len);
763 GainMeterBase::on_theme_changed()
765 style_changed = true;
768 GainMeter::GainMeter (Session& s)
769 : GainMeterBase (s, slider, false)
771 gain_display_box.set_homogeneous (true);
772 gain_display_box.set_spacing (2);
773 gain_display_box.pack_start (gain_display, true, true);
775 meter_metric_area.set_name ("AudioTrackMetrics");
776 set_size_request_to_display_given_text (meter_metric_area, "-50", 0, 0);
778 gain_automation_style_button.set_name ("MixerAutomationModeButton");
779 gain_automation_state_button.set_name ("MixerAutomationPlaybackButton");
781 ARDOUR_UI::instance()->tooltips().set_tip (gain_automation_state_button, _("Fader automation mode"));
782 ARDOUR_UI::instance()->tooltips().set_tip (gain_automation_style_button, _("Fader automation type"));
784 gain_automation_style_button.unset_flags (Gtk::CAN_FOCUS);
785 gain_automation_state_button.unset_flags (Gtk::CAN_FOCUS);
787 gain_automation_state_button.set_size_request(15, 15);
788 gain_automation_style_button.set_size_request(15, 15);
790 HBox* fader_centering_box = manage (new HBox);
791 fader_centering_box->pack_start (*gain_slider, true, false);
793 fader_vbox = manage (new Gtk::VBox());
794 fader_vbox->set_spacing (0);
795 fader_vbox->pack_start (*fader_centering_box, false, false, 0);
797 hbox.set_spacing (2);
798 hbox.pack_start (*fader_vbox, true, true);
802 pack_start (gain_display_box, Gtk::PACK_SHRINK);
803 pack_start (hbox, Gtk::PACK_SHRINK);
805 meter_metric_area.signal_expose_event().connect (mem_fun(*this, &GainMeter::meter_metrics_expose));
809 GainMeter::set_io (boost::shared_ptr<IO> io)
811 if (level_meter->get_parent()) {
812 hbox.remove (*level_meter);
815 if (peak_display.get_parent()) {
816 gain_display_box.remove (peak_display);
819 if (gain_automation_state_button.get_parent()) {
820 fader_vbox->remove (gain_automation_state_button);
823 GainMeterBase::set_io (io);
825 boost::shared_ptr<Route> r;
827 if ((r = boost::dynamic_pointer_cast<Route> (_io)) != 0) {
830 if we have a non-hidden route (ie. we're not the click or the auditioner),
831 pack some route-dependent stuff.
834 gain_display_box.pack_end (peak_display, true, true);
835 hbox.pack_end (*level_meter, true, true);
837 if (!r->is_hidden()) {
838 fader_vbox->pack_start (gain_automation_state_button, false, false, 0);
844 GainMeter::get_gm_width ()
847 hbox.size_request (sz);
851 Glib::RefPtr<Gdk::Pixmap>
852 GainMeter::render_metrics (Gtk::Widget& w)
854 Glib::RefPtr<Gdk::Window> win (w.get_window());
855 Glib::RefPtr<Gdk::GC> fg_gc (w.get_style()->get_fg_gc (Gtk::STATE_NORMAL));
856 Glib::RefPtr<Gdk::GC> bg_gc (w.get_style()->get_bg_gc (Gtk::STATE_NORMAL));
858 int db_points[] = { -50, -40, -20, -30, -10, -3, 0, 4 };
861 win->get_size (width, height);
863 Glib::RefPtr<Gdk::Pixmap> pixmap = Gdk::Pixmap::create (win, width, height);
865 metric_pixmaps[w.get_name()] = pixmap;
867 pixmap->draw_rectangle (bg_gc, true, 0, 0, width, height);
869 Glib::RefPtr<Pango::Layout> layout = w.create_pango_layout("");
871 for (uint32_t i = 0; i < sizeof (db_points)/sizeof (db_points[0]); ++i) {
873 float fraction = log_meter (db_points[i]);
874 gint pos = height - (gint) floor (height * fraction);
876 snprintf (buf, sizeof (buf), "%d", abs (db_points[i]));
878 layout->set_text (buf);
880 /* we want logical extents, not ink extents here */
883 layout->get_pixel_size (width, height);
885 pixmap->draw_line (fg_gc, 0, pos, 4, pos);
886 pixmap->draw_layout (fg_gc, 6, pos - (height/2), layout);
893 GainMeter::meter_metrics_expose (GdkEventExpose *ev)
895 static Glib::RefPtr<Gtk::Style> meter_style;
897 meter_style = meter_metric_area.get_style();
899 Glib::RefPtr<Gdk::Window> win (meter_metric_area.get_window());
900 Glib::RefPtr<Gdk::GC> bg_gc (meter_style->get_bg_gc (Gtk::STATE_INSENSITIVE));
901 GdkRectangle base_rect;
902 GdkRectangle draw_rect;
905 win->get_size (width, height);
907 base_rect.width = width;
908 base_rect.height = height;
912 Glib::RefPtr<Gdk::Pixmap> pixmap;
913 std::map<string,Glib::RefPtr<Gdk::Pixmap> >::iterator i = metric_pixmaps.find (meter_metric_area.get_name());
915 if (i == metric_pixmaps.end() || style_changed || dpi_changed) {
916 pixmap = render_metrics (meter_metric_area);
921 gdk_rectangle_intersect (&ev->area, &base_rect, &draw_rect);
922 win->draw_drawable (bg_gc, pixmap, draw_rect.x, draw_rect.y, draw_rect.x, draw_rect.y, draw_rect.width, draw_rect.height);
923 style_changed = false;
927 boost::shared_ptr<PBD::Controllable>
928 GainMeterBase::get_controllable()
930 return _io->gain_control();