MCU: fix monitor/immersive mute button

Monitor/Immersive mute on mackie controllers previously was not toggling
the actual monitor cut control that is tied to the GUI button.
This commit is contained in:
Franke Burgarino 2025-09-24 11:29:27 -05:00
parent cb64c9a9c1
commit c4cececfb7
2 changed files with 29 additions and 1 deletions

View file

@ -233,7 +233,9 @@ Strip::set_stripable (std::shared_ptr<Stripable> r, bool /*with_messages*/)
_stripable->solo_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_solo_changed, this), ui_context());
_stripable->mute_control()->Changed.connect(stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_mute_changed, this), ui_context());
if (_stripable->is_monitor() || _stripable->is_surround_master()) {
_stripable->monitor_control()->cut_control()->Changed.connect(stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_monitor_cut_changed, this), ui_context());
}
_stripable->MappedControlsChanged.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_subview_type_changed, this), ui_context());
std::shared_ptr<AutomationControl> pan_control = _stripable->pan_azimuth_control();
@ -338,6 +340,26 @@ Strip::notify_mute_changed ()
}
}
void
Strip::notify_monitor_cut_changed ()
{
DEBUG_TRACE (DEBUG::MackieControl, "Monitor cut changed\n");
if ((_stripable->is_monitor() || _stripable->is_surround_master()) && _mute) {
_surface->write (_mute->set_state (_stripable->monitor_control()->cut_control()->get_value() ? 1.0 : 0.0));
if (_stripable->mute_control()->get_value() != _stripable->monitor_control()->cut_control()->get_value()) {
Controllable::GroupControlDisposition gcd;
if (_surface->mcp().main_modifier_state() & MackieControlProtocol::MODIFIER_SHIFT) {
gcd = Controllable::InverseGroup;
} else {
gcd = Controllable::UseGroup;
}
_stripable->mute_control()->set_value (_stripable->monitor_control()->cut_control()->get_value() ? 1.0 : 0.0, gcd);
}
}
}
void
Strip::notify_record_enable_changed ()
{
@ -704,6 +726,11 @@ Strip::handle_button (Button& button, ButtonState bs)
(*c)->set_value (new_value, gcd);
}
if (_stripable->is_monitor() || _stripable->is_surround_master()) {
std::shared_ptr<MonitorProcessor> mp = _stripable->monitor_control();
mp->set_cut_all (!mp->cut_all());
}
} else {
DEBUG_TRACE (DEBUG::MackieControl, "remove button on release\n");
_surface->mcp().remove_down_button ((AutomationType) control->parameter().type(), _surface->number(), _index);

View file

@ -156,6 +156,7 @@ private:
void notify_solo_changed ();
void notify_mute_changed ();
void notify_monitor_cut_changed ();
void notify_record_enable_changed ();
void notify_subview_type_changed ();
void notify_gain_changed (bool force_update = true);