diff options
author | Robin Gareus <robin@gareus.org> | 2017-06-19 17:40:32 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-06-21 13:16:27 +0200 |
commit | 7c94499aeca8a67ee5f0fe51fb4f957d6618fef4 (patch) | |
tree | 94fa3d66ad0414226aba274bfc77bf7f451e297e /libs/ardour | |
parent | 31c6f66d9b75c70a4b02dfa78d5b45b357e18fe8 (diff) |
Remove Cruft -- AutomationStyle never did anything.
Trim automation is planned via SlavableAC as normal AutomationMode.
Some of this code have a revival (a special "Trim+Preview" state
before merging Automation but that has to be more general than Pan & Gain.
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/ardour/automatable.h | 3 | ||||
-rw-r--r-- | libs/ardour/ardour/automation_control.h | 5 | ||||
-rw-r--r-- | libs/ardour/ardour/automation_list.h | 5 | ||||
-rw-r--r-- | libs/ardour/ardour/pannable.h | 5 | ||||
-rw-r--r-- | libs/ardour/ardour/panner.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/types.h | 8 | ||||
-rw-r--r-- | libs/ardour/ardour/types_convert.h | 14 | ||||
-rw-r--r-- | libs/ardour/automatable.cc | 28 | ||||
-rw-r--r-- | libs/ardour/automation_control.cc | 7 | ||||
-rw-r--r-- | libs/ardour/automation_list.cc | 22 | ||||
-rw-r--r-- | libs/ardour/enums.cc | 5 | ||||
-rw-r--r-- | libs/ardour/luabindings.cc | 7 | ||||
-rw-r--r-- | libs/ardour/pannable.cc | 21 | ||||
-rw-r--r-- | libs/ardour/panner.cc | 12 | ||||
-rw-r--r-- | libs/ardour/utils.cc | 33 |
15 files changed, 0 insertions, 177 deletions
diff --git a/libs/ardour/ardour/automatable.h b/libs/ardour/ardour/automatable.h index f23948412f..8adfb88aae 100644 --- a/libs/ardour/ardour/automatable.h +++ b/libs/ardour/ardour/automatable.h @@ -91,9 +91,6 @@ public: AutoState get_parameter_automation_state (Evoral::Parameter param); virtual void set_parameter_automation_state (Evoral::Parameter param, AutoState); - AutoStyle get_parameter_automation_style (Evoral::Parameter param); - void set_parameter_automation_style (Evoral::Parameter param, AutoStyle); - void protect_automation (); const std::set<Evoral::Parameter>& what_can_be_automated() const { return _can_automate_list; } diff --git a/libs/ardour/ardour/automation_control.h b/libs/ardour/ardour/automation_control.h index 9879767807..6787abd87a 100644 --- a/libs/ardour/ardour/automation_control.h +++ b/libs/ardour/ardour/automation_control.h @@ -82,12 +82,7 @@ public: return alist() ? alist()->automation_state() : Off; } - inline AutoStyle automation_style() const { - return alist() ? alist()->automation_style() : Absolute; - } - void set_automation_state(AutoState as); - void set_automation_style(AutoStyle as); void start_touch(double when); void stop_touch(bool mark, double when); diff --git a/libs/ardour/ardour/automation_list.h b/libs/ardour/ardour/automation_list.h index 3f4d3f2f52..34f0a99eb1 100644 --- a/libs/ardour/ardour/automation_list.h +++ b/libs/ardour/ardour/automation_list.h @@ -88,10 +88,6 @@ class LIBARDOUR_API AutomationList : public Evoral::ControlList, public PBD::Sta AutoState automation_state() const { return _state; } PBD::Signal1<void, AutoState> automation_state_changed; - void set_automation_style (AutoStyle m); - AutoStyle automation_style() const { return _style; } - PBD::Signal0<void> automation_style_changed; - bool automation_playback() const { return (_state & Play) || ((_state & Touch) && !touching()); } @@ -130,7 +126,6 @@ class LIBARDOUR_API AutomationList : public Evoral::ControlList, public PBD::Sta void maybe_signal_changed (); AutoState _state; - AutoStyle _style; gint _touching; bool operator== (const AutomationList&) const { /* not called */ abort(); return false; } diff --git a/libs/ardour/ardour/pannable.h b/libs/ardour/ardour/pannable.h index fd8ffe6c28..bdac270891 100644 --- a/libs/ardour/ardour/pannable.h +++ b/libs/ardour/ardour/pannable.h @@ -57,10 +57,6 @@ class LIBARDOUR_API Pannable : public PBD::Stateful, public Automatable, public AutoState automation_state() const { return _auto_state; } PBD::Signal1<void, AutoState> automation_state_changed; - void set_automation_style (AutoStyle m); - AutoStyle automation_style() const { return _auto_style; } - PBD::Signal0<void> automation_style_changed; - bool automation_playback() const { return (_auto_state & Play) || ((_auto_state & Touch) && !touching()); } @@ -85,7 +81,6 @@ class LIBARDOUR_API Pannable : public PBD::Stateful, public Automatable, public protected: boost::weak_ptr<Panner> _panner; AutoState _auto_state; - AutoStyle _auto_style; gint _touching; bool _has_state; uint32_t _responding_to_control_auto_state_change; diff --git a/libs/ardour/ardour/panner.h b/libs/ardour/ardour/panner.h index 362a49851a..0773250094 100644 --- a/libs/ardour/ardour/panner.h +++ b/libs/ardour/ardour/panner.h @@ -105,8 +105,6 @@ public: void set_automation_state (AutoState); AutoState automation_state() const; - void set_automation_style (AutoStyle); - AutoStyle automation_style() const; virtual std::set<Evoral::Parameter> what_can_be_automated() const; virtual std::string describe_parameter (Evoral::Parameter); diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h index 0076a72a1f..ffda1ca42d 100644 --- a/libs/ardour/ardour/types.h +++ b/libs/ardour/ardour/types.h @@ -184,14 +184,6 @@ namespace ARDOUR { std::string auto_state_to_string (AutoState); AutoState string_to_auto_state (std::string); - enum AutoStyle { - Absolute = 0x1, - Trim = 0x2 - }; - - std::string auto_style_to_string (AutoStyle); - AutoStyle string_to_auto_style (std::string); - enum AlignStyle { CaptureTime, ExistingMaterial diff --git a/libs/ardour/ardour/types_convert.h b/libs/ardour/ardour/types_convert.h index cee969dd00..52cf616c29 100644 --- a/libs/ardour/ardour/types_convert.h +++ b/libs/ardour/ardour/types_convert.h @@ -89,20 +89,6 @@ inline bool string_to (const std::string& str, ARDOUR::AutoState& as) } template <> -inline bool to_string (ARDOUR::AutoStyle val, std::string& str) -{ - str = ARDOUR::auto_style_to_string (val); - return true; -} - -template <> -inline bool string_to (const std::string& str, ARDOUR::AutoStyle& as) -{ - as = ARDOUR::string_to_auto_style (str); - return true; -} - -template <> inline bool to_string (ARDOUR::DataType val, std::string& str) { str = val.to_string(); diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc index 417110e433..3045e8573c 100644 --- a/libs/ardour/automatable.cc +++ b/libs/ardour/automatable.cc @@ -314,34 +314,6 @@ Automatable::get_parameter_automation_state (Evoral::Parameter param) } void -Automatable::set_parameter_automation_style (Evoral::Parameter param, AutoStyle s) -{ - Glib::Threads::Mutex::Lock lm (control_lock()); - - boost::shared_ptr<AutomationControl> c = automation_control(param, true); - - if (c && (s != c->automation_style())) { - c->set_automation_style (s); - _a_session.set_dirty (); - } -} - -AutoStyle -Automatable::get_parameter_automation_style (Evoral::Parameter param) -{ - Glib::Threads::Mutex::Lock lm (control_lock()); - - boost::shared_ptr<Evoral::Control> c = control(param); - boost::shared_ptr<AutomationList> l = boost::dynamic_pointer_cast<AutomationList>(c->list()); - - if (c) { - return l->automation_style(); - } else { - return Absolute; // whatever - } -} - -void Automatable::protect_automation () { typedef set<Evoral::Parameter> ParameterSet; diff --git a/libs/ardour/automation_control.cc b/libs/ardour/automation_control.cc index e22379f75c..5da1d14d8b 100644 --- a/libs/ardour/automation_control.cc +++ b/libs/ardour/automation_control.cc @@ -243,13 +243,6 @@ AutomationControl::set_automation_state (AutoState as) } void -AutomationControl::set_automation_style (AutoStyle as) -{ - if (!_list) return; - alist()->set_automation_style (as); -} - -void AutomationControl::start_touch(double when) { if (!_list) { diff --git a/libs/ardour/automation_list.cc b/libs/ardour/automation_list.cc index 40c924d293..fbeb98fa26 100644 --- a/libs/ardour/automation_list.cc +++ b/libs/ardour/automation_list.cc @@ -59,7 +59,6 @@ AutomationList::AutomationList (const Evoral::Parameter& id, const Evoral::Param , _before (0) { _state = Off; - _style = Absolute; g_atomic_int_set (&_touching, 0); create_curve_if_necessary(); @@ -73,7 +72,6 @@ AutomationList::AutomationList (const Evoral::Parameter& id) , _before (0) { _state = Off; - _style = Absolute; g_atomic_int_set (&_touching, 0); create_curve_if_necessary(); @@ -87,7 +85,6 @@ AutomationList::AutomationList (const AutomationList& other) , StatefulDestructible() , _before (0) { - _style = other._style; _state = other._state; g_atomic_int_set (&_touching, other.touching()); @@ -101,7 +98,6 @@ AutomationList::AutomationList (const AutomationList& other, double start, doubl : ControlList(other, start, end) , _before (0) { - _style = other._style; _state = other._state; g_atomic_int_set (&_touching, other.touching()); @@ -120,7 +116,6 @@ AutomationList::AutomationList (const XMLNode& node, Evoral::Parameter id) { g_atomic_int_set (&_touching, 0); _state = Off; - _style = Absolute; set_state (node, Stateful::loading_state_version); @@ -173,7 +168,6 @@ AutomationList::operator= (const AutomationList& other) ControlList::operator= (other); _state = other._state; - _style = other._style; _touching = other._touching; mark_dirty (); @@ -209,15 +203,6 @@ AutomationList::set_automation_state (AutoState s) } void -AutomationList::set_automation_style (AutoStyle s) -{ - if (s != _style) { - _style = s; - automation_style_changed (); /* EMIT SIGNAL */ - } -} - -void AutomationList::start_write_pass (double when) { delete _before; @@ -359,8 +344,6 @@ AutomationList::state (bool full) root->set_property ("state", Off); } - root->set_property ("style", _style); - if (!_events.empty()) { root->add_child_nocopy (serialize_events()); } @@ -516,10 +499,6 @@ AutomationList::set_state (const XMLNode& node, int version) _default_value = 0.0; } - if (!node.get_property (X_("style"), _style)) { - _style = Absolute; - } - if (node.get_property (X_("state"), _state)) { if (_state == Write) { _state = Off; @@ -564,7 +543,6 @@ AutomationList::operator!= (AutomationList const & other) const return ( static_cast<ControlList const &> (*this) != static_cast<ControlList const &> (other) || _state != other._state || - _style != other._style || _touching != other._touching ); } diff --git a/libs/ardour/enums.cc b/libs/ardour/enums.cc index 76d21021a1..61a7e9a39f 100644 --- a/libs/ardour/enums.cc +++ b/libs/ardour/enums.cc @@ -96,7 +96,6 @@ setup_enum_writer () IOChange _IOChange; AutomationType _AutomationType; AutoState _AutoState; - AutoStyle _AutoStyle; AutoConnectOption _AutoConnectOption; TracksAutoNamingRule _TracksAutoNamingRule; Session::StateOfTheState _Session_StateOfTheState; @@ -192,10 +191,6 @@ setup_enum_writer () REGISTER_ENUM (Play); REGISTER_BITS (_AutoState); - REGISTER_ENUM (Absolute); - REGISTER_ENUM (Trim); - REGISTER_BITS (_AutoStyle); - REGISTER_ENUM (CaptureTime); REGISTER_ENUM (ExistingMaterial); REGISTER (_AlignStyle); diff --git a/libs/ardour/luabindings.cc b/libs/ardour/luabindings.cc index 3cc88fa414..8e3892c871 100644 --- a/libs/ardour/luabindings.cc +++ b/libs/ardour/luabindings.cc @@ -1378,9 +1378,7 @@ LuaBindings::common (lua_State* L) .addCast<Evoral::Control> ("to_ctrl") .addCast<SlavableAutomationControl> ("to_slavable") .addFunction ("automation_state", &AutomationControl::automation_state) - .addFunction ("automation_style", &AutomationControl::automation_style) .addFunction ("set_automation_state", &AutomationControl::set_automation_state) - .addFunction ("set_automation_style", &AutomationControl::set_automation_style) .addFunction ("start_touch", &AutomationControl::start_touch) .addFunction ("stop_touch", &AutomationControl::stop_touch) .addFunction ("get_value", &AutomationControl::get_value) @@ -1671,11 +1669,6 @@ LuaBindings::common (lua_State* L) .endNamespace () .endNamespace () - .beginNamespace ("AutoStyle") - .addConst ("Absolute", ARDOUR::AutoStyle(Absolute)) - .addConst ("Trim", ARDOUR::AutoStyle(Trim)) - .endNamespace () - .beginNamespace ("AutoState") .addConst ("Off", ARDOUR::AutoState(Off)) .addConst ("Write", ARDOUR::AutoState(Write)) diff --git a/libs/ardour/pannable.cc b/libs/ardour/pannable.cc index a32efc74aa..6b64a802bc 100644 --- a/libs/ardour/pannable.cc +++ b/libs/ardour/pannable.cc @@ -45,7 +45,6 @@ Pannable::Pannable (Session& s) , pan_frontback_control (new PanControllable (s, "", this, PanFrontBackAutomation)) , pan_lfe_control (new PanControllable (s, "", this, PanLFEAutomation)) , _auto_state (Off) - , _auto_style (Absolute) , _has_state (false) , _responding_to_control_auto_state_change (0) { @@ -137,26 +136,6 @@ Pannable::set_automation_state (AutoState state) } void -Pannable::set_automation_style (AutoStyle style) -{ - if (style != _auto_style) { - _auto_style = style; - - const Controls& c (controls()); - - for (Controls::const_iterator ci = c.begin(); ci != c.end(); ++ci) { - boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl>(ci->second); - if (ac) { - ac->alist()->set_automation_style (style); - } - } - - session().set_dirty (); - automation_style_changed (); - } -} - -void Pannable::start_touch (double when) { const Controls& c (controls()); diff --git a/libs/ardour/panner.cc b/libs/ardour/panner.cc index 59e4e2e977..a388b5fdc2 100644 --- a/libs/ardour/panner.cc +++ b/libs/ardour/panner.cc @@ -67,12 +67,6 @@ Panner::distribute_automated (BufferSet& ibufs, BufferSet& obufs, } void -Panner::set_automation_style (AutoStyle style) -{ - _pannable->set_automation_style (style); -} - -void Panner::set_automation_state (AutoState state) { _pannable->set_automation_state (state); @@ -84,12 +78,6 @@ Panner::automation_state () const return _pannable->automation_state(); } -AutoStyle -Panner::automation_style () const -{ - return _pannable->automation_style (); -} - bool Panner::touching () const { diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc index 8b89107748..18f9d247d8 100644 --- a/libs/ardour/utils.cc +++ b/libs/ardour/utils.cc @@ -590,39 +590,6 @@ ARDOUR::auto_state_to_string (AutoState as) return ""; } -AutoStyle -ARDOUR::string_to_auto_style (std::string str) -{ - if (str == X_("Absolute")) { - return Absolute; - } else if (str == X_("Trim")) { - return Trim; - } - - fatal << string_compose (_("programming error: %1 %2"), "illegal AutoStyle string: ", str) << endmsg; - abort(); /*NOTREACHED*/ - return Trim; -} - -string -ARDOUR::auto_style_to_string (AutoStyle as) -{ - /* to be used only for XML serialization, no i18n done */ - - switch (as) { - case Absolute: - return X_("Absolute"); - break; - case Trim: - return X_("Trim"); - break; - } - - fatal << string_compose (_("programming error: %1 %2"), "illegal AutoStyle type: ", as) << endmsg; - abort(); /*NOTREACHED*/ - return ""; -} - std::string bool_as_string (bool yn) { |