move VCA assignment up to Route level
[ardour.git] / libs / ardour / route.cc
index db92edf786f2df78cdf8ed4c6c993af17afc1560..edffc3f3cec7cb03a662bf0370a7eeaacae23575 100644 (file)
@@ -5894,3 +5894,23 @@ Route::slaved_to (boost::shared_ptr<VCA> vca) const
 
        return _gain_control->slaved_to (vca);
 }
+
+void
+Route::vca_assign (boost::shared_ptr<VCA> vca)
+{
+       _gain_control->add_master (vca);
+       vca->add_solo_mute_target (shared_from_this());
+}
+
+void
+Route::vca_unassign (boost::shared_ptr<VCA> vca)
+{
+       if (!vca) {
+               /* unassign from all */
+               _gain_control->clear_masters ();
+               /* XXXX need to remove from solo/mute target lists */
+       } else {
+               _gain_control->remove_master (vca);
+               vca->remove_solo_mute_target (shared_from_this());
+       }
+}