diff options
author | Robin Gareus <robin@gareus.org> | 2017-07-08 15:35:30 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-07-08 15:35:30 +0200 |
commit | 82278af424461a9d966dc886302ceb24e775a32c (patch) | |
tree | 4c95c72a31ccab21674c6f9c9af52b3e4b9db2c2 /libs/ardour | |
parent | 60df2a342c2f244d6b002692caa279c17dc5d26d (diff) |
Add API to expand/flatten AC groups
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/ardour/automation_control.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/types.h | 2 | ||||
-rw-r--r-- | libs/ardour/automation_control.cc | 10 |
3 files changed, 14 insertions, 0 deletions
diff --git a/libs/ardour/ardour/automation_control.h b/libs/ardour/ardour/automation_control.h index 6787abd87a..6fe88ca52d 100644 --- a/libs/ardour/ardour/automation_control.h +++ b/libs/ardour/ardour/automation_control.h @@ -119,6 +119,8 @@ public: const ARDOUR::Session& session() const { return _session; } void commit_transaction (bool did_write); + ControlList grouped_controls () const; + protected: ARDOUR::Session& _session; boost::shared_ptr<ControlGroup> _group; diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h index 3adfaf5c94..7a0c5762b7 100644 --- a/libs/ardour/ardour/types.h +++ b/libs/ardour/ardour/types.h @@ -23,6 +23,7 @@ #include <istream> #include <vector> #include <map> +#include <set> #include <boost/shared_ptr.hpp> #include <sys/types.h> #include <stdint.h> @@ -570,6 +571,7 @@ namespace ARDOUR { typedef std::list<boost::weak_ptr <Stripable> > WeakStripableList; typedef std::list<boost::shared_ptr<AutomationControl> > ControlList; typedef std::list<boost::shared_ptr<SlavableAutomationControl> > SlavableControlList; + typedef std::set <boost::shared_ptr<AutomationControl> > AutomationControlSet; typedef std::list<boost::shared_ptr<VCA> > VCAList; diff --git a/libs/ardour/automation_control.cc b/libs/ardour/automation_control.cc index 30eb19fd5a..acd4c7a760 100644 --- a/libs/ardour/automation_control.cc +++ b/libs/ardour/automation_control.cc @@ -136,6 +136,16 @@ AutomationControl::set_value (double val, PBD::Controllable::GroupControlDisposi } } +ControlList +AutomationControl::grouped_controls () const +{ + if (_group && _group->use_me (PBD::Controllable::UseGroup)) { + return _group->controls (); + } else { + return ControlList (); + } +} + /** Set the value and do the right thing based on automation state * (e.g. record if necessary, etc.) * @param value `user' value |