diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index e8c8a58ae2..469e2cba32 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -703,6 +703,8 @@ protected: std::shared_ptr _triggerbox; std::shared_ptr _master_send; + void create_master_send (); + bool _volume_applies_to_output; std::shared_ptr _delayline; diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 4d3c090282..1c38c3799b 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -3325,7 +3325,16 @@ Route::set_processor_state (XMLNode const& node, int version, XMLProperty const* if (prop->value() == "intsend") { - processor.reset (new InternalSend (_session, _pannable, _mute_master, std::dynamic_pointer_cast(shared_from_this()), std::shared_ptr(), Delivery::Aux, true)); + XMLProperty const * role_prop = node.property (X_("role")); + if (role_prop && role_prop->value() == "MasterSend") { + if (Profile->get_livetrax()) { + create_master_send (); + assert (_master_send); + processor = _master_send; + } + } else { + processor.reset (new InternalSend (_session, _pannable, _mute_master, std::dynamic_pointer_cast(shared_from_this()), std::shared_ptr(), Delivery::Aux, true)); + } } else if (prop->value() == "ladspa" || prop->value() == "Ladspa" || prop->value() == "lv2" || @@ -3517,6 +3526,14 @@ Route::remove_monitor_send () _monitor_send.reset (); } +void +Route::create_master_send () +{ + _master_send.reset (new InternalSend (_session, pannable(), _mute_master, std::dynamic_pointer_cast (shared_from_this()), _session.master_out(), Delivery::MasterSend, false)); + _master_send->set_display_to_user (false); + _master_send->gain_control()->set_value (dB_to_coefficient (0.0), Controllable::NoGroup); +} + void Route::enable_master_send() { @@ -3533,9 +3550,7 @@ Route::enable_master_send() /* make sure we have one */ if (!_master_send) { /* An internal send with its own panner to deliver to the master bus */ - _master_send.reset (new InternalSend (_session, pannable(), _mute_master, std::dynamic_pointer_cast (shared_from_this()), _session.master_out(), Delivery::MasterSend, false)); - _master_send->set_display_to_user (false); - _master_send->gain_control()->set_value (dB_to_coefficient (0.0), Controllable::NoGroup); + create_master_send (); } /* set it up */