13
0

add slaved_to() and slaved() methods to VCA

This commit is contained in:
Paul Davis 2016-05-19 10:44:09 -04:00
parent b2df48263b
commit a48888e688
2 changed files with 27 additions and 0 deletions

View File

@ -60,6 +60,11 @@ class LIBARDOUR_API VCA : public Stripable,
XMLNode& get_state();
int set_state (XMLNode const&, int version);
/* Slavable API */
bool slaved_to (boost::shared_ptr<VCA>) const;
bool slaved () const;
/* Soloable API */
void clear_all_solo_state ();

View File

@ -172,3 +172,25 @@ VCA::monitoring_state () const
/* XXX this has to get more complex but not clear how */
return MonitoringInput;
}
bool
VCA::slaved () const
{
if (!_gain_control) {
return false;
}
/* just test one particular control, not all of them */
return _gain_control->slaved ();
}
bool
VCA::slaved_to (boost::shared_ptr<VCA> vca) const
{
if (!vca || !_gain_control) {
return false;
}
/* just test one particular control, not all of them */
return _gain_control->slaved_to (vca->gain_control());
}