Add API to query control-masters
This allows to traverse VCA masters upstream, and potentially build a graph.
This commit is contained in:
parent
9dd4931247
commit
7d6e429001
@ -46,6 +46,8 @@ public:
|
||||
bool slaved_to (boost::shared_ptr<AutomationControl>) const;
|
||||
bool slaved () const;
|
||||
|
||||
std::set<boost::shared_ptr<AutomationControl>> masters () const;
|
||||
|
||||
virtual void automation_run (samplepos_t start, pframes_t nframes);
|
||||
|
||||
double get_masters_value () const {
|
||||
|
@ -615,6 +615,20 @@ SlavableAutomationControl::slaved () const
|
||||
return !_masters.empty();
|
||||
}
|
||||
|
||||
std::set<boost::shared_ptr<AutomationControl>>
|
||||
SlavableAutomationControl::masters () const
|
||||
{
|
||||
std::set<boost::shared_ptr<AutomationControl>> rv;
|
||||
Glib::Threads::RWLock::ReaderLock lm (master_lock);
|
||||
for (auto const& m : _masters) {
|
||||
boost::shared_ptr<AutomationControl> ac (m.second.master ());
|
||||
if (ac) {
|
||||
rv.insert (ac);
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
int
|
||||
SlavableAutomationControl::MasterRecord::set_state (XMLNode const& n, int)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user