Partially implement IConnectionPoint::connect()

This now works for direct connections, which is probably how most hosts
will use this.
This commit is contained in:
Robbert van der Helm
2020-12-18 14:09:20 +01:00
parent 41a9ca5a36
commit cfa4849467
8 changed files with 50 additions and 8 deletions
+9
View File
@@ -270,6 +270,15 @@ void Vst3Logger::log_request(bool is_host_vst,
});
}
void Vst3Logger::log_request(bool is_host_vst,
const YaConnectionPoint::Connect& request) {
log_request_base(is_host_vst, [&](auto& message) {
message << request.instance_id
<< ": IConnectionPoint::connect(other = <IConnectionPoint* #"
<< request.other_instance_id << ">)";
});
}
void Vst3Logger::log_request(
bool is_host_vst,
const YaEditController2::SetComponentState& request) {
+1
View File
@@ -79,6 +79,7 @@ class Vst3Logger {
void log_request(bool is_host_vst, const YaComponent::GetRoutingInfo&);
void log_request(bool is_host_vst, const YaComponent::ActivateBus&);
void log_request(bool is_host_vst, const YaComponent::SetActive&);
void log_request(bool is_host_vst, const YaConnectionPoint::Connect&);
void log_request(bool is_host_vst,
const YaEditController2::SetComponentState&);
void log_request(bool is_host_vst,
+1
View File
@@ -75,6 +75,7 @@ using ControlRequest = std::variant<Vst3PluginProxy::Construct,
YaComponent::GetRoutingInfo,
YaComponent::ActivateBus,
YaComponent::SetActive,
YaConnectionPoint::Connect,
YaEditController2::SetComponentState,
YaEditController2::GetParameterCount,
YaEditController2::GetParameterInfo,
@@ -67,6 +67,29 @@ class YaConnectionPoint : public Steinberg::Vst::IConnectionPoint {
inline bool supported() const { return arguments.supported; }
/**
* Message to pass through a call to
* `IConnectionPoint::connect(other_instance_id)` to the Wine plugin host.
*/
struct Connect {
using Response = UniversalTResult;
native_size_t instance_id;
/**
* The other object this object should be connected to. When connecting
* two `Vst3PluginProxy` objects, we can directly connect the underlying
* objects on the Wine side.
*/
native_size_t other_instance_id;
template <typename S>
void serialize(S& s) {
s.value8b(instance_id);
s.value8b(other_instance_id);
}
};
virtual tresult PLUGIN_API connect(IConnectionPoint* other) override = 0;
virtual tresult PLUGIN_API disconnect(IConnectionPoint* other) override = 0;
virtual tresult PLUGIN_API