mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Implement Vst3ContextMenuProxyImpl destructor
This commit is contained in:
@@ -924,6 +924,16 @@ bool Vst3Logger::log_request(bool is_host_vst,
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Vst3Logger::log_request(bool is_host_vst,
|
||||||
|
const Vst3ContextMenuProxy::Destruct& request) {
|
||||||
|
return log_request_base(is_host_vst, [&](auto& message) {
|
||||||
|
// We don't know what class this instance was originally instantiated
|
||||||
|
// as, but it also doesn't really matter
|
||||||
|
message << request.owner_instance_id << ": <IContextMenu #"
|
||||||
|
<< request.context_menu_id << ">::~IContextMenu()";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
bool Vst3Logger::log_request(bool is_host_vst, const WantsConfiguration&) {
|
bool Vst3Logger::log_request(bool is_host_vst, const WantsConfiguration&) {
|
||||||
return log_request_base(is_host_vst, [&](auto& message) {
|
return log_request_base(is_host_vst, [&](auto& message) {
|
||||||
message << "Requesting <Configuration>";
|
message << "Requesting <Configuration>";
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ class Vst3Logger {
|
|||||||
bool log_request(bool is_host_vst, const YaComponent::ActivateBus&);
|
bool log_request(bool is_host_vst, const YaComponent::ActivateBus&);
|
||||||
bool log_request(bool is_host_vst, const YaComponent::SetActive&);
|
bool log_request(bool is_host_vst, const YaComponent::SetActive&);
|
||||||
|
|
||||||
|
bool log_request(bool is_host_vst, const Vst3ContextMenuProxy::Destruct&);
|
||||||
bool log_request(bool is_host_vst, const WantsConfiguration&);
|
bool log_request(bool is_host_vst, const WantsConfiguration&);
|
||||||
bool log_request(bool is_host_vst, const YaComponentHandler::BeginEdit&);
|
bool log_request(bool is_host_vst, const YaComponentHandler::BeginEdit&);
|
||||||
bool log_request(bool is_host_vst, const YaComponentHandler::PerformEdit&);
|
bool log_request(bool is_host_vst, const YaComponentHandler::PerformEdit&);
|
||||||
|
|||||||
@@ -170,7 +170,8 @@ 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<WantsConfiguration,
|
using CallbackRequest = std::variant<Vst3ContextMenuProxy::Destruct,
|
||||||
|
WantsConfiguration,
|
||||||
YaComponentHandler::BeginEdit,
|
YaComponentHandler::BeginEdit,
|
||||||
YaComponentHandler::PerformEdit,
|
YaComponentHandler::PerformEdit,
|
||||||
YaComponentHandler::EndEdit,
|
YaComponentHandler::EndEdit,
|
||||||
|
|||||||
@@ -49,6 +49,15 @@ Vst3PluginBridge::Vst3PluginBridge()
|
|||||||
sockets.vst_host_callback.receive_messages(
|
sockets.vst_host_callback.receive_messages(
|
||||||
std::pair<Vst3Logger&, bool>(logger, false),
|
std::pair<Vst3Logger&, bool>(logger, false),
|
||||||
overload{
|
overload{
|
||||||
|
[&](const Vst3ContextMenuProxy::Destruct& request)
|
||||||
|
-> Vst3ContextMenuProxy::Destruct::Response {
|
||||||
|
assert(
|
||||||
|
plugin_proxies.at(request.owner_instance_id)
|
||||||
|
.get()
|
||||||
|
.unregister_context_menu(request.context_menu_id));
|
||||||
|
|
||||||
|
return Ack{};
|
||||||
|
},
|
||||||
[&](const WantsConfiguration&) -> WantsConfiguration::Response {
|
[&](const WantsConfiguration&) -> WantsConfiguration::Response {
|
||||||
return config;
|
return config;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -26,12 +26,9 @@ Vst3ContextMenuProxyImpl::Vst3ContextMenuProxyImpl(
|
|||||||
Vst3ContextMenuProxyImpl::~Vst3ContextMenuProxyImpl() {
|
Vst3ContextMenuProxyImpl::~Vst3ContextMenuProxyImpl() {
|
||||||
// Also drop the context menu smart pointer on plugin side when this gets
|
// Also drop the context menu smart pointer on plugin side when this gets
|
||||||
// dropped
|
// dropped
|
||||||
// TODO: Uncomment when we implement this
|
bridge.send_message(
|
||||||
// bridge.send_message(
|
Vst3ContextMenuProxy::Destruct{.owner_instance_id = owner_instance_id(),
|
||||||
// Vst3ContextMenuProxy::Destruct{.owner_instance_id =
|
.context_menu_id = context_menu_id()});
|
||||||
// owner_instance_id(),
|
|
||||||
// .context_menu_id =
|
|
||||||
// context_menu_id()});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tresult PLUGIN_API
|
tresult PLUGIN_API
|
||||||
|
|||||||
Reference in New Issue
Block a user