13
0

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
Signed by: rgareus
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)) {
_add_to_selection = value != 0;
} else if (0 == strcmp (id, ContextInfo::kMute)) {
boost::shared_ptr<AutomationControl> ac = lookup_ac (_owner, id);
if (ac) {
ac->set_value (value != 0 ? 1 : 0, Controllable::NoGroup);
}
s->session().set_control (lookup_ac (_owner, id), value != 0 ? 1 : 0, Controllable::NoGroup);
} else if (0 == strcmp (id, ContextInfo::kSolo)) {
boost::shared_ptr<AutomationControl> ac = lookup_ac (_owner, id);
if (ac) {
ac->set_value (value != 0 ? 1 : 0, Controllable::NoGroup);
}
s->session().set_control (lookup_ac (_owner, id), value != 0 ? 1 : 0, Controllable::NoGroup);
} else {
DEBUG_TRACE (DEBUG::VST3Callbacks, "VST3PI::setContextInfoValue<int>: unsupported ID\n");
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];
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); // << correct way, needs a session ptr
session->set_control (r->solo_control(), yn ? 1.0 : 0.0, Controllable::UseGroup);
}
}

View File

@ -411,7 +411,9 @@ FP8Strip::set_solo (bool on)
return;
}
_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

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)) {
return float_message_with_id (X_("/strip/solo"), ssid, 0, sur->feedback[2], get_address (msg));
}
if (s->solo_control()) {
s->solo_control()->set_value (yn ? 1.0 : 0.0, sur->usegroup);
}
session->set_control (s->solo_control(), yn ? 1.0 : 0.0, sur->usegroup);
}
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;
case 1:
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;
case 2: