mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-09 20:29:10 +02:00
Add IUnitHandler stubs to component handler proxy
This commit is contained in:
@@ -21,10 +21,13 @@ Vst3ComponentHandlerProxy::ConstructArgs::ConstructArgs() {}
|
|||||||
Vst3ComponentHandlerProxy::ConstructArgs::ConstructArgs(
|
Vst3ComponentHandlerProxy::ConstructArgs::ConstructArgs(
|
||||||
Steinberg::IPtr<Steinberg::FUnknown> object,
|
Steinberg::IPtr<Steinberg::FUnknown> object,
|
||||||
size_t owner_instance_id)
|
size_t owner_instance_id)
|
||||||
: owner_instance_id(owner_instance_id), component_handler_args(object) {}
|
: owner_instance_id(owner_instance_id),
|
||||||
|
component_handler_args(object),
|
||||||
|
unit_handler_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)),
|
||||||
|
YaUnitHandler(std::move(args.unit_handler_args)),
|
||||||
arguments(std::move(args)){FUNKNOWN_CTOR}
|
arguments(std::move(args)){FUNKNOWN_CTOR}
|
||||||
|
|
||||||
Vst3ComponentHandlerProxy::~Vst3ComponentHandlerProxy() {
|
Vst3ComponentHandlerProxy::~Vst3ComponentHandlerProxy() {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "component-handler/component-handler.h"
|
#include "component-handler/component-handler.h"
|
||||||
|
#include "component-handler/unit-handler.h"
|
||||||
|
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
|
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
|
||||||
@@ -30,7 +31,8 @@
|
|||||||
* by the plugin we are proxying for the `IComponentHandler*` argument passed to
|
* by the plugin we are proxying for the `IComponentHandler*` argument passed to
|
||||||
* plugin by the host.
|
* plugin by the host.
|
||||||
*/
|
*/
|
||||||
class Vst3ComponentHandlerProxy : public YaComponentHandler {
|
class Vst3ComponentHandlerProxy : public YaComponentHandler,
|
||||||
|
public YaUnitHandler {
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* These are the arguments for constructing a
|
* These are the arguments for constructing a
|
||||||
@@ -55,11 +57,13 @@ class Vst3ComponentHandlerProxy : public YaComponentHandler {
|
|||||||
native_size_t owner_instance_id;
|
native_size_t owner_instance_id;
|
||||||
|
|
||||||
YaComponentHandler::ConstructArgs component_handler_args;
|
YaComponentHandler::ConstructArgs component_handler_args;
|
||||||
|
YaUnitHandler::ConstructArgs unit_handler_args;
|
||||||
|
|
||||||
template <typename S>
|
template <typename S>
|
||||||
void serialize(S& s) {
|
void serialize(S& s) {
|
||||||
s.value8b(owner_instance_id);
|
s.value8b(owner_instance_id);
|
||||||
s.object(component_handler_args);
|
s.object(component_handler_args);
|
||||||
|
s.object(unit_handler_args);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -66,3 +66,18 @@ Vst3ComponentHandlerProxyImpl::restartComponent(int32 flags) {
|
|||||||
return bridge.send_message(YaComponentHandler::RestartComponent{
|
return bridge.send_message(YaComponentHandler::RestartComponent{
|
||||||
.owner_instance_id = owner_instance_id(), .flags = flags});
|
.owner_instance_id = owner_instance_id(), .flags = flags});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::notifyUnitSelection(
|
||||||
|
Steinberg::Vst::UnitID unitId) {
|
||||||
|
// TODO: Implement
|
||||||
|
std::cerr << "TODO: IUnitHandler::notifyUnitSelection" << std::endl;
|
||||||
|
return Steinberg::kNotImplemented;
|
||||||
|
}
|
||||||
|
|
||||||
|
tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::notifyProgramListChange(
|
||||||
|
Steinberg::Vst::ProgramListID listId,
|
||||||
|
int32 programIndex) {
|
||||||
|
// TODO: Implement
|
||||||
|
std::cerr << "TODO: IUnitHandler::notifyProgramListChange" << std::endl;
|
||||||
|
return Steinberg::kNotImplemented;
|
||||||
|
}
|
||||||
|
|||||||
@@ -39,6 +39,13 @@ class Vst3ComponentHandlerProxyImpl : public Vst3ComponentHandlerProxy {
|
|||||||
tresult PLUGIN_API endEdit(Steinberg::Vst::ParamID id) override;
|
tresult PLUGIN_API endEdit(Steinberg::Vst::ParamID id) override;
|
||||||
tresult PLUGIN_API restartComponent(int32 flags) override;
|
tresult PLUGIN_API restartComponent(int32 flags) override;
|
||||||
|
|
||||||
|
// From `IUnitHandler`
|
||||||
|
tresult PLUGIN_API
|
||||||
|
notifyUnitSelection(Steinberg::Vst::UnitID unitId) override;
|
||||||
|
tresult PLUGIN_API
|
||||||
|
notifyProgramListChange(Steinberg::Vst::ProgramListID listId,
|
||||||
|
int32 programIndex) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Vst3Bridge& bridge;
|
Vst3Bridge& bridge;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user