13
0

send gain control for MasterSend must use GainAutomation parameter to be groupable

ControlGroups don't admit controls with a different parameter type, and a RouteGroup's
_gain_group uses GainAutomation as its parameter type.
This commit is contained in:
Paul Davis 2024-05-10 17:37:05 -06:00
parent 857ef78417
commit 1f262d83ee

View File

@ -108,8 +108,13 @@ Send::Send (Session& s, std::shared_ptr<Pannable> p, std::shared_ptr<MuteMaster>
{
//boost_debug_shared_ptr_mark_interesting (this, "send");
std::shared_ptr<AutomationList> gl (new AutomationList (Evoral::Parameter (BusSendLevel), *this));
set_gain_control (std::shared_ptr<GainControl> (new GainControl (_session, Evoral::Parameter(BusSendLevel), gl)));
if (role() == MasterSend) {
std::shared_ptr<AutomationList> gl (new AutomationList (Evoral::Parameter (GainAutomation), *this));
set_gain_control (std::shared_ptr<GainControl> (new GainControl (_session, Evoral::Parameter (GainAutomation), gl)));
} else {
std::shared_ptr<AutomationList> gl (new AutomationList (Evoral::Parameter (BusSendLevel), *this));
set_gain_control (std::shared_ptr<GainControl> (new GainControl (_session, Evoral::Parameter (BusSendLevel), gl)));
}
gain_control ()->set_flag (Controllable::InlineControl);
add_control (gain_control ());