NOOP, remove trailing tabs/whitespace.
[ardour.git] / libs / ardour / automatable.cc
index 0538c84cc5917a6d74ef1c8291fce0af17aec7b5..a2ce81acca360acd203d97fcb120403da65572ce 100644 (file)
@@ -66,7 +66,7 @@ Automatable::~Automatable ()
 {
        {
                Glib::Threads::Mutex::Lock lm (_control_lock);
-               
+
                for (Controls::const_iterator li = _controls.begin(); li != _controls.end(); ++li) {
                        boost::dynamic_pointer_cast<AutomationControl>(li->second)->drop_references ();
                }
@@ -163,6 +163,8 @@ Automatable::describe_parameter (Evoral::Parameter param)
 
        if (param == Evoral::Parameter(GainAutomation)) {
                return _("Fader");
+       } else if (param.type() == TrimAutomation) {
+               return _("Trim");
        } else if (param.type() == MuteAutomation) {
                return _("Mute");
        } else if (param.type() == MidiCCAutomation) {
@@ -173,8 +175,10 @@ Automatable::describe_parameter (Evoral::Parameter param)
                return string_compose("Bender [%1]", int(param.channel()) + 1);
        } else if (param.type() == MidiChannelPressureAutomation) {
                return string_compose("Pressure [%1]", int(param.channel()) + 1);
+#ifdef LV2_SUPPORT
        } else if (param.type() == PluginPropertyAutomation) {
                return string_compose("Property %1", URIMap::instance().id_to_uri(param.id()));
+#endif
        } else {
                return EventTypeMap::instance().to_symbol(param);
        }
@@ -274,6 +278,7 @@ Automatable::set_parameter_automation_state (Evoral::Parameter param, AutoState
        if (c && (s != c->automation_state())) {
                c->set_automation_state (s);
                _a_session.set_dirty ();
+               AutomationStateChanged(); /* Emit signal */
        }
 }
 
@@ -283,7 +288,7 @@ Automatable::get_parameter_automation_state (Evoral::Parameter param)
        AutoState result = Off;
 
        boost::shared_ptr<AutomationControl> c = automation_control(param);
-       
+
        if (c) {
                result = c->automation_state();
        }
@@ -408,8 +413,6 @@ Automatable::control_factory(const Evoral::Parameter& param)
                if (mt) {
                        control = new MidiTrack::MidiControl(mt, param);
                        make_list = false;  // No list, this is region "automation"
-               } else {
-                       warning << "MidiCCAutomation for non-MidiTrack" << endl;
                }
        } else if (param.type() == PluginAutomation) {
                PluginInsert* pi = dynamic_cast<PluginInsert*>(this);
@@ -441,6 +444,13 @@ Automatable::control_factory(const Evoral::Parameter& param)
                } else {
                        warning << "GainAutomation for non-Amp" << endl;
                }
+       } else if (param.type() == TrimAutomation) {
+               Amp* amp = dynamic_cast<Amp*>(this);
+               if (amp) {
+                       control = new Amp::GainControl(X_("trimcontrol"), _a_session, amp, param);
+               } else {
+                       warning << "TrimAutomation for non-Amp" << endl;
+               }
        } else if (param.type() == PanAzimuthAutomation || param.type() == PanWidthAutomation || param.type() == PanElevationAutomation) {
                Pannable* pannable = dynamic_cast<Pannable*>(this);
                if (pannable) {