mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-17 00:43:56 +02:00
Add stubs for IUnitHandler2
This commit is contained in:
@@ -25,13 +25,15 @@ Vst3ComponentHandlerProxy::ConstructArgs::ConstructArgs(
|
|||||||
component_handler_args(object),
|
component_handler_args(object),
|
||||||
component_handler_2_args(object),
|
component_handler_2_args(object),
|
||||||
component_handler_3_args(object),
|
component_handler_3_args(object),
|
||||||
unit_handler_args(object) {}
|
unit_handler_args(object),
|
||||||
|
unit_handler_2_args(object) {}
|
||||||
|
|
||||||
Vst3ComponentHandlerProxy::Vst3ComponentHandlerProxy(const ConstructArgs&& args)
|
Vst3ComponentHandlerProxy::Vst3ComponentHandlerProxy(const ConstructArgs&& args)
|
||||||
: YaComponentHandler(std::move(args.component_handler_args)),
|
: YaComponentHandler(std::move(args.component_handler_args)),
|
||||||
YaComponentHandler2(std::move(args.component_handler_2_args)),
|
YaComponentHandler2(std::move(args.component_handler_2_args)),
|
||||||
YaComponentHandler3(std::move(args.component_handler_3_args)),
|
YaComponentHandler3(std::move(args.component_handler_3_args)),
|
||||||
YaUnitHandler(std::move(args.unit_handler_args)),
|
YaUnitHandler(std::move(args.unit_handler_args)),
|
||||||
|
YaUnitHandler2(std::move(args.unit_handler_2_args)),
|
||||||
arguments(std::move(args)){FUNKNOWN_CTOR}
|
arguments(std::move(args)){FUNKNOWN_CTOR}
|
||||||
|
|
||||||
Vst3ComponentHandlerProxy::~Vst3ComponentHandlerProxy() {
|
Vst3ComponentHandlerProxy::~Vst3ComponentHandlerProxy() {
|
||||||
@@ -64,6 +66,10 @@ Vst3ComponentHandlerProxy::queryInterface(Steinberg::FIDString _iid,
|
|||||||
QUERY_INTERFACE(_iid, obj, Steinberg::Vst::IUnitHandler::iid,
|
QUERY_INTERFACE(_iid, obj, Steinberg::Vst::IUnitHandler::iid,
|
||||||
Steinberg::Vst::IUnitHandler)
|
Steinberg::Vst::IUnitHandler)
|
||||||
}
|
}
|
||||||
|
if (YaUnitHandler2::supported()) {
|
||||||
|
QUERY_INTERFACE(_iid, obj, Steinberg::Vst::IUnitHandler2::iid,
|
||||||
|
Steinberg::Vst::IUnitHandler2)
|
||||||
|
}
|
||||||
|
|
||||||
*obj = nullptr;
|
*obj = nullptr;
|
||||||
return Steinberg::kNoInterface;
|
return Steinberg::kNoInterface;
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
#include "component-handler/component-handler-2.h"
|
#include "component-handler/component-handler-2.h"
|
||||||
#include "component-handler/component-handler-3.h"
|
#include "component-handler/component-handler-3.h"
|
||||||
#include "component-handler/component-handler.h"
|
#include "component-handler/component-handler.h"
|
||||||
|
#include "component-handler/unit-handler-2.h"
|
||||||
#include "component-handler/unit-handler.h"
|
#include "component-handler/unit-handler.h"
|
||||||
|
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
@@ -36,7 +37,8 @@
|
|||||||
class Vst3ComponentHandlerProxy : public YaComponentHandler,
|
class Vst3ComponentHandlerProxy : public YaComponentHandler,
|
||||||
public YaComponentHandler2,
|
public YaComponentHandler2,
|
||||||
public YaComponentHandler3,
|
public YaComponentHandler3,
|
||||||
public YaUnitHandler {
|
public YaUnitHandler,
|
||||||
|
public YaUnitHandler2 {
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* These are the arguments for constructing a
|
* These are the arguments for constructing a
|
||||||
@@ -64,6 +66,7 @@ class Vst3ComponentHandlerProxy : public YaComponentHandler,
|
|||||||
YaComponentHandler2::ConstructArgs component_handler_2_args;
|
YaComponentHandler2::ConstructArgs component_handler_2_args;
|
||||||
YaComponentHandler3::ConstructArgs component_handler_3_args;
|
YaComponentHandler3::ConstructArgs component_handler_3_args;
|
||||||
YaUnitHandler::ConstructArgs unit_handler_args;
|
YaUnitHandler::ConstructArgs unit_handler_args;
|
||||||
|
YaUnitHandler2::ConstructArgs unit_handler_2_args;
|
||||||
|
|
||||||
template <typename S>
|
template <typename S>
|
||||||
void serialize(S& s) {
|
void serialize(S& s) {
|
||||||
@@ -72,6 +75,7 @@ class Vst3ComponentHandlerProxy : public YaComponentHandler,
|
|||||||
s.object(component_handler_2_args);
|
s.object(component_handler_2_args);
|
||||||
s.object(component_handler_3_args);
|
s.object(component_handler_3_args);
|
||||||
s.object(unit_handler_args);
|
s.object(unit_handler_args);
|
||||||
|
s.object(unit_handler_2_args);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -128,3 +128,9 @@ tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::notifyProgramListChange(
|
|||||||
.list_id = listId,
|
.list_id = listId,
|
||||||
.program_index = programIndex});
|
.program_index = programIndex});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::notifyUnitByBusChange() {
|
||||||
|
// TODO: Implement
|
||||||
|
std::cerr << "TODO: IUnitHandler2::notifyUnitSelection()" << std::endl;
|
||||||
|
return Steinberg::kNotImplemented;
|
||||||
|
}
|
||||||
|
|||||||
@@ -57,6 +57,9 @@ class Vst3ComponentHandlerProxyImpl : public Vst3ComponentHandlerProxy {
|
|||||||
notifyProgramListChange(Steinberg::Vst::ProgramListID listId,
|
notifyProgramListChange(Steinberg::Vst::ProgramListID listId,
|
||||||
int32 programIndex) override;
|
int32 programIndex) override;
|
||||||
|
|
||||||
|
// From `IUnitHandler2`
|
||||||
|
tresult PLUGIN_API notifyUnitByBusChange() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Vst3Bridge& bridge;
|
Vst3Bridge& bridge;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user