mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 12:10:09 +02:00
Implement the plugin side if IComponentHandler3
This commit is contained in:
@@ -39,6 +39,26 @@ Vst3PluginProxyImpl::queryInterface(const Steinberg::TUID _iid, void** obj) {
|
||||
return result;
|
||||
}
|
||||
|
||||
size_t Vst3PluginProxyImpl::register_context_menu(
|
||||
Steinberg::IPtr<Steinberg::Vst::IContextMenu> menu) {
|
||||
std::lock_guard lock(context_menus_mutex);
|
||||
|
||||
const size_t context_menu_id = current_context_menu_id.fetch_add(1);
|
||||
context_menus.emplace(context_menu_id, std::move(menu));
|
||||
|
||||
return context_menu_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregister a context menu using the ID generated by a previous call to
|
||||
* `register_context_menu()`. This will release the context menu object
|
||||
* returned by the host.
|
||||
*/
|
||||
bool Vst3PluginProxyImpl::unregister_context_menu(size_t context_menu_id) {
|
||||
std::lock_guard lock(context_menus_mutex);
|
||||
return context_menus.erase(context_menu_id);
|
||||
}
|
||||
|
||||
tresult PLUGIN_API Vst3PluginProxyImpl::setAudioPresentationLatencySamples(
|
||||
Steinberg::Vst::BusDirection dir,
|
||||
int32 busIndex,
|
||||
@@ -373,6 +393,7 @@ tresult PLUGIN_API Vst3PluginProxyImpl::setComponentHandler(
|
||||
// Automatically converted smart pointers for when the plugin performs a
|
||||
// callback later
|
||||
component_handler_2 = component_handler;
|
||||
component_handler_3 = component_handler;
|
||||
unit_handler = component_handler;
|
||||
|
||||
return bridge.send_message(YaEditController::SetComponentHandler{
|
||||
|
||||
Reference in New Issue
Block a user