bool is_active () const { return _active.val(); }
bool is_relative () const { return _relative.val(); }
bool is_hidden () const { return _hidden.val(); }
- bool is_gain () const { return _gain.val() && _group_master_number.val() <= 0; }
+ bool is_gain () const { return _gain.val(); }
bool is_mute () const { return _mute.val(); }
bool is_solo () const { return _solo.val(); }
bool is_recenable () const { return _recenable.val(); }
void push_to_groups ();
uint32_t _rgba;
+ bool _used_to_share_gain;
};
} /* namespace */
, _gain_group (new GainControlGroup ())
, _monitoring_group (new ControlGroup (MonitoringAutomation))
, _rgba (0)
+ , _used_to_share_gain (false)
{
_xml_node_name = X_("RouteGroup");
node->set_property ("id", id());
node->set_property ("rgba", _rgba);
+ node->set_property ("used-to-share-gain", _used_to_share_gain);
add_properties (*node);
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)) {
if (is_gain() == yn) {
return;
}
- if (has_control_master()) {
- return;
- }
_gain = yn;
_gain_group->set_active (yn);
(*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
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