summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/mixer_strip.cc15
-rw-r--r--libs/ardour/ardour/route.h2
-rw-r--r--libs/ardour/route.cc20
3 files changed, 25 insertions, 12 deletions
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc
index 87e0aa74c1..7896c4bd0e 100644
--- a/gtk2_ardour/mixer_strip.cc
+++ b/gtk2_ardour/mixer_strip.cc
@@ -2508,10 +2508,8 @@ MixerStrip::vca_menu_toggle (CheckMenuItem* menuitem, uint32_t n)
}
if (!menuitem->get_active()) {
- cerr << "Unassign from " << n << endl;
_mixer.do_vca_unassign (vca);
} else {
- cerr << "Assign to " << n << endl;
_mixer.do_vca_assign (vca);
}
}
@@ -2522,8 +2520,8 @@ MixerStrip::vca_assign (boost::shared_ptr<VCA> vca)
if (!vca || !_route) {
return;
}
- _route->gain_control()->add_master (vca);
- vca->add_solo_mute_target (_route);
+
+ _route->vca_assign (vca);
}
void
@@ -2533,14 +2531,7 @@ MixerStrip::vca_unassign (boost::shared_ptr<VCA> vca)
return;
}
- if (!vca) {
- /* null VCA means drop all VCA assignments */
- _route->gain_control()->clear_masters ();
- /* XXX Need to remove all solo/mute target entries */
- } else {
- _route->gain_control()->remove_master (vca);
- vca->remove_solo_mute_target (_route);
- }
+ _route->vca_unassign (vca);
}
bool
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index b187c39629..f819ddac63 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -710,6 +710,8 @@ public:
pframes_t nframes, int declick);
bool slaved_to (boost::shared_ptr<VCA>) const;
+ void vca_assign (boost::shared_ptr<VCA>);
+ void vca_unassign (boost::shared_ptr<VCA>);
protected:
friend class Session;
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index db92edf786..edffc3f3ce 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -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());
+ }
+}