mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-13 20:09:59 +02:00
Implement IConnectionPoint::notify
This commit is contained in:
@@ -108,6 +108,21 @@ bool Vst3Logger::log_request(bool is_host_vst,
|
||||
});
|
||||
}
|
||||
|
||||
bool Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaConnectionPoint::Notify& request) {
|
||||
return log_request_base(is_host_vst, [&](auto& message) {
|
||||
message << request.instance_id
|
||||
<< ": IConnectionPoint::notify(message = <IMessage* ";
|
||||
if (const char* id =
|
||||
const_cast<YaMessage&>(request.message).getMessageID()) {
|
||||
message << "with ID = \"" << id << "\"";
|
||||
} else {
|
||||
message << "without an ID";
|
||||
}
|
||||
message << ">)";
|
||||
});
|
||||
}
|
||||
|
||||
bool Vst3Logger::log_request(
|
||||
bool is_host_vst,
|
||||
const YaEditController::SetComponentState& request) {
|
||||
|
||||
@@ -66,6 +66,7 @@ class Vst3Logger {
|
||||
bool log_request(bool is_host_vst, const Vst3PluginProxy::GetState&);
|
||||
bool log_request(bool is_host_vst, const YaConnectionPoint::Connect&);
|
||||
bool log_request(bool is_host_vst, const YaConnectionPoint::Disconnect&);
|
||||
bool log_request(bool is_host_vst, const YaConnectionPoint::Notify&);
|
||||
bool log_request(bool is_host_vst,
|
||||
const YaEditController::SetComponentState&);
|
||||
bool log_request(bool is_host_vst,
|
||||
|
||||
@@ -68,6 +68,7 @@ using ControlRequest = std::variant<Vst3PlugViewProxy::Destruct,
|
||||
Vst3PluginProxy::GetState,
|
||||
YaConnectionPoint::Connect,
|
||||
YaConnectionPoint::Disconnect,
|
||||
YaConnectionPoint::Notify,
|
||||
YaEditController::SetComponentState,
|
||||
YaEditController::GetParameterCount,
|
||||
YaEditController::GetParameterInfo,
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "../../common.h"
|
||||
#include "../base.h"
|
||||
#include "../message.h"
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
|
||||
@@ -119,6 +120,30 @@ class YaConnectionPoint : public Steinberg::Vst::IConnectionPoint {
|
||||
};
|
||||
|
||||
virtual tresult PLUGIN_API disconnect(IConnectionPoint* other) override = 0;
|
||||
|
||||
/**
|
||||
* Message to pass through a call to `IConnectionPoint::notify(message)` to
|
||||
* the Wine plugin host. Since `IAttributeList` does not have any way to
|
||||
* iterate over all values, we only support messages sent by plugins using
|
||||
* our own implementation of the interface, since there's no way to
|
||||
* serialize them otherwise. This `IConnectionPoint::notify()`
|
||||
* implementation is also only used with hosts that do not connect objects
|
||||
* directly and use connection proxies instead.
|
||||
*/
|
||||
struct Notify {
|
||||
using Response = UniversalTResult;
|
||||
|
||||
native_size_t instance_id;
|
||||
|
||||
YaMessage message;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value8b(instance_id);
|
||||
s.object(message);
|
||||
}
|
||||
};
|
||||
|
||||
virtual tresult PLUGIN_API
|
||||
notify(Steinberg::Vst::IMessage* message) override = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user