Use session API to set solo

This is required so that ::update_route_solo_state() is called
to propagate solo/mute state
This commit is contained in:
Robin Gareus 2020-10-18 15:28:10 +02:00
parent 72736289c8
commit a266a2d5b9
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
5 changed files with 8 additions and 15 deletions

View file

@ -2689,15 +2689,9 @@ VST3PI::setContextInfoValue (FIDString id, int32 value)
} else if (0 == strcmp (id, ContextInfo::kMultiSelect)) { } else if (0 == strcmp (id, ContextInfo::kMultiSelect)) {
_add_to_selection = value != 0; _add_to_selection = value != 0;
} else if (0 == strcmp (id, ContextInfo::kMute)) { } else if (0 == strcmp (id, ContextInfo::kMute)) {
boost::shared_ptr<AutomationControl> ac = lookup_ac (_owner, id); s->session().set_control (lookup_ac (_owner, id), value != 0 ? 1 : 0, Controllable::NoGroup);
if (ac) {
ac->set_value (value != 0 ? 1 : 0, Controllable::NoGroup);
}
} else if (0 == strcmp (id, ContextInfo::kSolo)) { } else if (0 == strcmp (id, ContextInfo::kSolo)) {
boost::shared_ptr<AutomationControl> ac = lookup_ac (_owner, id); s->session().set_control (lookup_ac (_owner, id), value != 0 ? 1 : 0, Controllable::NoGroup);
if (ac) {
ac->set_value (value != 0 ? 1 : 0, Controllable::NoGroup);
}
} else { } else {
DEBUG_TRACE (DEBUG::VST3Callbacks, "VST3PI::setContextInfoValue<int>: unsupported ID\n"); DEBUG_TRACE (DEBUG::VST3Callbacks, "VST3PI::setContextInfoValue<int>: unsupported ID\n");
return kNotImplemented; return kNotImplemented;

View file

@ -287,8 +287,7 @@ ControlProtocol::route_set_soloed (uint32_t table_index, bool yn)
boost::shared_ptr<Route> r = route_table[table_index]; boost::shared_ptr<Route> r = route_table[table_index];
if (r != 0) { if (r != 0) {
r->solo_control()->set_value (yn ? 1.0 : 0.0, Controllable::UseGroup); // XXX does not propagate session->set_control (r->solo_control(), yn ? 1.0 : 0.0, Controllable::UseGroup);
//_session->set_control (r->solo_control(), yn ? 1.0 : 0.0, Controllable::UseGroup); // << correct way, needs a session ptr
} }
} }

View file

@ -411,7 +411,9 @@ FP8Strip::set_solo (bool on)
return; return;
} }
_solo_ctrl->start_touch (_solo_ctrl->session().transport_sample()); _solo_ctrl->start_touch (_solo_ctrl->session().transport_sample());
_solo_ctrl->set_value (on ? 1.0 : 0.0, group_mode ()); PBD::Controllable::GroupControlDisposition gcd = group_mode ();
Session& s = const_cast<Session&> (_solo_ctrl->session());
s.set_control (_solo_ctrl, on ? 1.0 : 0.0, gcd);
} }
void void

View file

@ -4205,9 +4205,7 @@ OSC::route_solo (int ssid, int yn, lo_message msg)
if ((sur->temp_mode == BusOnly) && (s != sur->temp_master)) { if ((sur->temp_mode == BusOnly) && (s != sur->temp_master)) {
return float_message_with_id (X_("/strip/solo"), ssid, 0, sur->feedback[2], get_address (msg)); return float_message_with_id (X_("/strip/solo"), ssid, 0, sur->feedback[2], get_address (msg));
} }
if (s->solo_control()) { session->set_control (s->solo_control(), yn ? 1.0 : 0.0, sur->usegroup);
s->solo_control()->set_value (yn ? 1.0 : 0.0, sur->usegroup);
}
} }
return float_message_with_id (X_("/strip/solo"), ssid, 0, sur->feedback[2], get_address (msg)); return float_message_with_id (X_("/strip/solo"), ssid, 0, sur->feedback[2], get_address (msg));

View file

@ -224,7 +224,7 @@ TrackMixLayout::button_lower (uint32_t n)
break; break;
case 1: case 1:
if (stripable->solo_control()) { if (stripable->solo_control()) {
stripable->solo_control()->set_value (!stripable->solo_control()->get_value(), PBD::Controllable::UseGroup); session.set_control (stripable->solo_control(), !stripable->solo_control()->self_soloed(), PBD::Controllable::UseGroup);
} }
break; break;
case 2: case 2: