mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Fully implement IUnitHandler2
This commit is contained in:
@@ -200,7 +200,8 @@ using CallbackRequest = std::variant<Vst3ContextMenuProxy::Destruct,
|
|||||||
YaHostApplication::GetName,
|
YaHostApplication::GetName,
|
||||||
YaPlugFrame::ResizeView,
|
YaPlugFrame::ResizeView,
|
||||||
YaUnitHandler::NotifyUnitSelection,
|
YaUnitHandler::NotifyUnitSelection,
|
||||||
YaUnitHandler::NotifyProgramListChange>;
|
YaUnitHandler::NotifyProgramListChange,
|
||||||
|
YaUnitHandler2::NotifyUnitByBusChange>;
|
||||||
|
|
||||||
template <typename S>
|
template <typename S>
|
||||||
void serialize(S& s, CallbackRequest& payload) {
|
void serialize(S& s, CallbackRequest& payload) {
|
||||||
|
|||||||
@@ -450,6 +450,7 @@ tresult PLUGIN_API Vst3PluginProxyImpl::setComponentHandler(
|
|||||||
component_handler_2 = component_handler;
|
component_handler_2 = component_handler;
|
||||||
component_handler_3 = component_handler;
|
component_handler_3 = component_handler;
|
||||||
unit_handler = component_handler;
|
unit_handler = component_handler;
|
||||||
|
unit_handler_2 = component_handler;
|
||||||
|
|
||||||
return bridge.send_message(YaEditController::SetComponentHandler{
|
return bridge.send_message(YaEditController::SetComponentHandler{
|
||||||
.instance_id = instance_id(),
|
.instance_id = instance_id(),
|
||||||
|
|||||||
@@ -327,6 +327,7 @@ class Vst3PluginProxyImpl : public Vst3PluginProxy {
|
|||||||
Steinberg::FUnknownPtr<Steinberg::Vst::IComponentHandler3>
|
Steinberg::FUnknownPtr<Steinberg::Vst::IComponentHandler3>
|
||||||
component_handler_3;
|
component_handler_3;
|
||||||
Steinberg::FUnknownPtr<Steinberg::Vst::IUnitHandler> unit_handler;
|
Steinberg::FUnknownPtr<Steinberg::Vst::IUnitHandler> unit_handler;
|
||||||
|
Steinberg::FUnknownPtr<Steinberg::Vst::IUnitHandler2> unit_handler_2;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Vst3PluginBridge& bridge;
|
Vst3PluginBridge& bridge;
|
||||||
|
|||||||
@@ -267,6 +267,12 @@ Vst3PluginBridge::Vst3PluginBridge()
|
|||||||
.unit_handler->notifyProgramListChange(
|
.unit_handler->notifyProgramListChange(
|
||||||
request.list_id, request.program_index);
|
request.list_id, request.program_index);
|
||||||
},
|
},
|
||||||
|
[&](const YaUnitHandler2::NotifyUnitByBusChange& request)
|
||||||
|
-> YaUnitHandler2::NotifyUnitByBusChange::Response {
|
||||||
|
return plugin_proxies.at(request.owner_instance_id)
|
||||||
|
.get()
|
||||||
|
.unit_handler_2->notifyUnitByBusChange();
|
||||||
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,7 +130,6 @@ tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::notifyProgramListChange(
|
|||||||
}
|
}
|
||||||
|
|
||||||
tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::notifyUnitByBusChange() {
|
tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::notifyUnitByBusChange() {
|
||||||
// TODO: Implement
|
return bridge.send_message(YaUnitHandler2::NotifyUnitByBusChange{
|
||||||
std::cerr << "TODO: IUnitHandler2::notifyUnitSelection()" << std::endl;
|
.owner_instance_id = owner_instance_id()});
|
||||||
return Steinberg::kNotImplemented;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user