mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-16 16:33:55 +02:00
Fully implement IComponentHandlerBusActivation
We now support all VST 3.6.8 features. (or technically, also all VST 3.6.10 features)
This commit is contained in:
@@ -180,31 +180,33 @@ void serialize(S& s, AudioProcessorRequest& payload) {
|
|||||||
* information we want or the operation we want to perform. A request of type
|
* information we want or the operation we want to perform. A request of type
|
||||||
* `CallbackRequest(T)` should send back a `T::Response`.
|
* `CallbackRequest(T)` should send back a `T::Response`.
|
||||||
*/
|
*/
|
||||||
using CallbackRequest = std::variant<Vst3ContextMenuProxy::Destruct,
|
using CallbackRequest =
|
||||||
WantsConfiguration,
|
std::variant<Vst3ContextMenuProxy::Destruct,
|
||||||
YaComponentHandler::BeginEdit,
|
WantsConfiguration,
|
||||||
YaComponentHandler::PerformEdit,
|
YaComponentHandler::BeginEdit,
|
||||||
YaComponentHandler::EndEdit,
|
YaComponentHandler::PerformEdit,
|
||||||
YaComponentHandler::RestartComponent,
|
YaComponentHandler::EndEdit,
|
||||||
YaComponentHandler2::SetDirty,
|
YaComponentHandler::RestartComponent,
|
||||||
YaComponentHandler2::RequestOpenEditor,
|
YaComponentHandler2::SetDirty,
|
||||||
YaComponentHandler2::StartGroupEdit,
|
YaComponentHandler2::RequestOpenEditor,
|
||||||
YaComponentHandler2::FinishGroupEdit,
|
YaComponentHandler2::StartGroupEdit,
|
||||||
YaComponentHandler3::CreateContextMenu,
|
YaComponentHandler2::FinishGroupEdit,
|
||||||
// Used when the host uses proxy objects,
|
YaComponentHandler3::CreateContextMenu,
|
||||||
// and we have to route
|
YaComponentHandlerBusActivation::RequestBusActivation,
|
||||||
// `IConnectionPoint::notify` calls through
|
// Used when the host uses proxy objects,
|
||||||
// there
|
// and we have to route
|
||||||
YaConnectionPoint::Notify,
|
// `IConnectionPoint::notify` calls through
|
||||||
YaContextMenu::GetItemCount,
|
// there
|
||||||
YaContextMenu::AddItem,
|
YaConnectionPoint::Notify,
|
||||||
YaContextMenu::RemoveItem,
|
YaContextMenu::GetItemCount,
|
||||||
YaContextMenu::Popup,
|
YaContextMenu::AddItem,
|
||||||
YaHostApplication::GetName,
|
YaContextMenu::RemoveItem,
|
||||||
YaPlugFrame::ResizeView,
|
YaContextMenu::Popup,
|
||||||
YaUnitHandler::NotifyUnitSelection,
|
YaHostApplication::GetName,
|
||||||
YaUnitHandler::NotifyProgramListChange,
|
YaPlugFrame::ResizeView,
|
||||||
YaUnitHandler2::NotifyUnitByBusChange>;
|
YaUnitHandler::NotifyUnitSelection,
|
||||||
|
YaUnitHandler::NotifyProgramListChange,
|
||||||
|
YaUnitHandler2::NotifyUnitByBusChange>;
|
||||||
|
|
||||||
template <typename S>
|
template <typename S>
|
||||||
void serialize(S& s, CallbackRequest& payload) {
|
void serialize(S& s, CallbackRequest& payload) {
|
||||||
|
|||||||
@@ -449,6 +449,7 @@ tresult PLUGIN_API Vst3PluginProxyImpl::setComponentHandler(
|
|||||||
// callback later
|
// callback later
|
||||||
component_handler_2 = component_handler;
|
component_handler_2 = component_handler;
|
||||||
component_handler_3 = component_handler;
|
component_handler_3 = component_handler;
|
||||||
|
component_handler_bus_activation = component_handler;
|
||||||
unit_handler = component_handler;
|
unit_handler = component_handler;
|
||||||
unit_handler_2 = component_handler;
|
unit_handler_2 = component_handler;
|
||||||
|
|
||||||
|
|||||||
@@ -334,6 +334,8 @@ class Vst3PluginProxyImpl : public Vst3PluginProxy {
|
|||||||
component_handler_2;
|
component_handler_2;
|
||||||
Steinberg::FUnknownPtr<Steinberg::Vst::IComponentHandler3>
|
Steinberg::FUnknownPtr<Steinberg::Vst::IComponentHandler3>
|
||||||
component_handler_3;
|
component_handler_3;
|
||||||
|
Steinberg::FUnknownPtr<Steinberg::Vst::IComponentHandlerBusActivation>
|
||||||
|
component_handler_bus_activation;
|
||||||
Steinberg::FUnknownPtr<Steinberg::Vst::IUnitHandler> unit_handler;
|
Steinberg::FUnknownPtr<Steinberg::Vst::IUnitHandler> unit_handler;
|
||||||
Steinberg::FUnknownPtr<Steinberg::Vst::IUnitHandler2> unit_handler_2;
|
Steinberg::FUnknownPtr<Steinberg::Vst::IUnitHandler2> unit_handler_2;
|
||||||
|
|
||||||
|
|||||||
@@ -149,6 +149,17 @@ Vst3PluginBridge::Vst3PluginBridge()
|
|||||||
.context_menu_args = std::nullopt};
|
.context_menu_args = std::nullopt};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
[&](const YaComponentHandlerBusActivation::RequestBusActivation&
|
||||||
|
request) -> YaComponentHandlerBusActivation::
|
||||||
|
RequestBusActivation::Response {
|
||||||
|
return plugin_proxies
|
||||||
|
.at(request.owner_instance_id)
|
||||||
|
.get()
|
||||||
|
.component_handler_bus_activation
|
||||||
|
->requestBusActivation(
|
||||||
|
request.type, request.dir,
|
||||||
|
request.index, request.state);
|
||||||
|
},
|
||||||
[&](const YaContextMenu::GetItemCount& request)
|
[&](const YaContextMenu::GetItemCount& request)
|
||||||
-> YaContextMenu::GetItemCount::Response {
|
-> YaContextMenu::GetItemCount::Response {
|
||||||
return plugin_proxies.at(request.owner_instance_id)
|
return plugin_proxies.at(request.owner_instance_id)
|
||||||
|
|||||||
@@ -119,10 +119,13 @@ tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::requestBusActivation(
|
|||||||
Steinberg::Vst::BusDirection dir,
|
Steinberg::Vst::BusDirection dir,
|
||||||
int32 index,
|
int32 index,
|
||||||
TBool state) {
|
TBool state) {
|
||||||
// TODO: Implement
|
return bridge.send_message(
|
||||||
std::cerr << "TODO: IComponentHandlerBusActivation::requestBusActivation()"
|
YaComponentHandlerBusActivation::RequestBusActivation{
|
||||||
<< std::endl;
|
.owner_instance_id = owner_instance_id(),
|
||||||
return Steinberg::kNotImplemented;
|
.type = type,
|
||||||
|
.dir = dir,
|
||||||
|
.index = index,
|
||||||
|
.state = state});
|
||||||
}
|
}
|
||||||
|
|
||||||
tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::notifyUnitSelection(
|
tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::notifyUnitSelection(
|
||||||
|
|||||||
Reference in New Issue
Block a user