mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 12:30:12 +02:00
Implement IComponentHandler::beginEdit()
This commit is contained in:
@@ -446,6 +446,14 @@ bool Vst3Logger::log_request(bool is_host_vst, const WantsConfiguration&) {
|
||||
});
|
||||
}
|
||||
|
||||
bool Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaComponentHandler::BeginEdit& request) {
|
||||
return log_request_base(is_host_vst, [&](auto& message) {
|
||||
message << request.owner_instance_id
|
||||
<< ": IComponentHandler::beginEdit(" << request.id << ")";
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_response(bool is_host_vst, const Ack&) {
|
||||
log_response_base(is_host_vst, [&](auto& message) { message << "ACK"; });
|
||||
}
|
||||
|
||||
@@ -108,7 +108,9 @@ class Vst3Logger {
|
||||
bool log_request(bool is_host_vst, const YaPluginBase::Terminate&);
|
||||
bool log_request(bool is_host_vst, const YaPluginFactory::Construct&);
|
||||
bool log_request(bool is_host_vst, const YaPluginFactory::SetHostContext&);
|
||||
|
||||
bool log_request(bool is_host_vst, const WantsConfiguration&);
|
||||
bool log_request(bool is_host_vst, const YaComponentHandler::BeginEdit&);
|
||||
|
||||
void log_response(bool is_host_vst, const Ack&);
|
||||
void log_response(
|
||||
|
||||
@@ -105,7 +105,8 @@ void serialize(S& s, ControlRequest& payload) {
|
||||
* information we want or the operation we want to perform. A request of type
|
||||
* `CallbackRequest(T)` should send back a `T::Response`.
|
||||
*/
|
||||
using CallbackRequest = std::variant<WantsConfiguration>;
|
||||
using CallbackRequest =
|
||||
std::variant<WantsConfiguration, YaComponentHandler::BeginEdit>;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s, CallbackRequest& payload) {
|
||||
|
||||
@@ -61,6 +61,24 @@ class YaComponentHandler : public Steinberg::Vst::IComponentHandler {
|
||||
|
||||
inline bool supported() const { return arguments.supported; }
|
||||
|
||||
/**
|
||||
* Message to pass through a call to `IComponentHandler::beginEdit(id)` to
|
||||
* the component handler provided by the host.
|
||||
*/
|
||||
struct BeginEdit {
|
||||
using Response = UniversalTResult;
|
||||
|
||||
native_size_t owner_instance_id;
|
||||
|
||||
Steinberg::Vst::ParamID id;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value8b(owner_instance_id);
|
||||
s.value4b(id);
|
||||
}
|
||||
};
|
||||
|
||||
virtual tresult PLUGIN_API
|
||||
beginEdit(Steinberg::Vst::ParamID id) override = 0;
|
||||
virtual tresult PLUGIN_API
|
||||
|
||||
Reference in New Issue
Block a user