From e9d72383c7d175506565e9ce807bd93d58417d1c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 9 Apr 2016 16:16:22 -0400 Subject: [PATCH] extend function of Automatable::control_factory() [ this may be the wrong design ... review coming ] --- libs/ardour/automatable.cc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc index d02139b4d1..1ff80057ae 100644 --- a/libs/ardour/automatable.cc +++ b/libs/ardour/automatable.cc @@ -29,11 +29,13 @@ #include "ardour/automatable.h" #include "ardour/event_type_map.h" #include "ardour/gain_control.h" +#include "ardour/monitor_control.h" #include "ardour/midi_track.h" #include "ardour/pan_controllable.h" #include "ardour/pannable.h" #include "ardour/plugin.h" #include "ardour/plugin_insert.h" +#include "ardour/record_enable_control.h" #include "ardour/session.h" #include "ardour/uri_map.h" #include "ardour/value_as_string.h" @@ -422,6 +424,7 @@ Automatable::control_factory(const Evoral::Parameter& param) bool make_list = true; ParameterDescriptor desc(param); boost::shared_ptr list; + if (param.type() >= MidiCCAutomation && param.type() <= MidiChannelPressureAutomation) { MidiTrack* mt = dynamic_cast(this); if (mt) { @@ -462,6 +465,27 @@ Automatable::control_factory(const Evoral::Parameter& param) } else { warning << "PanAutomation for non-Pannable" << endl; } + } else if (param.type() == RecEnableAutomation) { + Recordable* re = dynamic_cast (this); + if (re) { + control = new RecordEnableControl (_a_session, X_("recenable"), *re); + } + } else if (param.type() == MonitoringAutomation) { + Monitorable* m = dynamic_cast(this); + if (m) { + control = new MonitorControl (_a_session, X_("monitor"), *m); + } + } else if (param.type() == SoloAutomation) { + Soloable* s = dynamic_cast(this); + Muteable* m = dynamic_cast(this); + if (s && m) { + control = new SoloControl (_a_session, X_("solo"), *s, *m); + } + } else if (param.type() == MuteAutomation) { + Muteable* m = dynamic_cast(this); + if (m) { + control = new MuteControl (_a_session, X_("mute"), *m); + } } if (make_list && !list) {