summaryrefslogtreecommitdiff
path: root/libs/ardour/route_group.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-06-12 22:37:09 +0200
committerRobin Gareus <robin@gareus.org>2017-06-13 01:08:30 +0200
commit293ab1ef53ae66c862b3ff6708071c37d6fa12eb (patch)
tree8074c445b67a7b43300f7498b7d0dae6f4f27382 /libs/ardour/route_group.cc
parent9441e8d484964e0f8942c82b0112c8ad92aa9e3e (diff)
Allow group gain sharing + VCA again
Diffstat (limited to 'libs/ardour/route_group.cc')
-rw-r--r--libs/ardour/route_group.cc30
1 files changed, 6 insertions, 24 deletions
diff --git a/libs/ardour/route_group.cc b/libs/ardour/route_group.cc
index c41a890a02..92291f852c 100644
--- a/libs/ardour/route_group.cc
+++ b/libs/ardour/route_group.cc
@@ -110,6 +110,7 @@ RouteGroup::RouteGroup (Session& s, const string &n)
, _gain_group (new GainControlGroup ())
, _monitoring_group (new ControlGroup (MonitoringAutomation))
, _rgba (0)
+ , _used_to_share_gain (false)
{
_xml_node_name = X_("RouteGroup");
@@ -259,6 +260,7 @@ RouteGroup::get_state ()
node->set_property ("id", id());
node->set_property ("rgba", _rgba);
+ node->set_property ("used-to-share-gain", _used_to_share_gain);
add_properties (*node);
@@ -285,6 +287,7 @@ RouteGroup::set_state (const XMLNode& node, int version)
set_id (node);
set_values (node);
node.get_property ("rgba", _rgba);
+ node.get_property ("used-to-share-gain", _used_to_share_gain);
std::string routes;
if (node.get_property ("routes", routes)) {
@@ -350,9 +353,6 @@ RouteGroup::set_gain (bool yn)
if (is_gain() == yn) {
return;
}
- if (has_control_master()) {
- return;
- }
_gain = yn;
_gain_group->set_active (yn);
@@ -648,19 +648,11 @@ RouteGroup::assign_master (boost::shared_ptr<VCA> master)
(*r)->assign (master, false);
}
- bool used_to_share_gain = false;
-
- if (is_gain()) {
- used_to_share_gain = true;
- }
-
group_master = master;
_group_master_number = master->number();
- _gain_group->set_active (false);
- if (used_to_share_gain) {
- send_change (PropertyChange (Properties::group_gain));
- }
+ _used_to_share_gain = is_gain ();
+ set_gain (false);
}
void
@@ -683,17 +675,7 @@ RouteGroup::unassign_master (boost::shared_ptr<VCA> master)
group_master.reset ();
_group_master_number = -1;
- /* this is slightly tricky: is_gain() will return whether or not
- the group is supposed to be sharing gain adjustment, and now that
- we've reset _group_master_number to -1, it will reflect the user's
- intentions correctly. Since there was a master before, and now there
- is not, we are going to reactivate gain sharing ... and then tell
- the world about it.
- */
- if (is_gain()) {
- _gain_group->set_active (true);
- send_change (PropertyChange (Properties::group_gain));
- }
+ set_gain (_used_to_share_gain);
}
bool