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