Add API to expand/flatten AC groups

This commit is contained in:
Robin Gareus 2017-07-08 15:35:30 +02:00
parent 60df2a342c
commit 82278af424
3 changed files with 14 additions and 0 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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