mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Split off IComponent and create a monolithic class
We can now use implement all VST3 plugin interfaces through this class, check whether the object from the plugin also supports these classes, and then conditionally allow casting to the supported classes. This should give us a one-to-one proxy of the original object.
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
#include "common.h"
|
||||
|
||||
// Forward declaration
|
||||
class YaComponentPluginImpl;
|
||||
class YaPluginMonolithImpl;
|
||||
|
||||
/**
|
||||
* This handles the communication between the native host and a VST3 plugin
|
||||
@@ -83,9 +83,11 @@ class Vst3PluginBridge : PluginBridge<Vst3Sockets<std::jthread>> {
|
||||
* context.
|
||||
*
|
||||
* @see component_instances
|
||||
*
|
||||
* TODO: REname to `register_instance` or `register_object`
|
||||
*/
|
||||
void register_component(size_t instance_id,
|
||||
YaComponentPluginImpl& component);
|
||||
YaPluginMonolithImpl& component);
|
||||
|
||||
/**
|
||||
* Remove a previously registered `YaComponentPluginImpl` from the list of
|
||||
@@ -149,7 +151,7 @@ class Vst3PluginBridge : PluginBridge<Vst3Sockets<std::jthread>> {
|
||||
* `register_component()` in the constractor, and an instance is then
|
||||
* removed through a call to `unregister_component()` in the destructor.
|
||||
*/
|
||||
std::map<size_t, std::reference_wrapper<YaComponentPluginImpl>>
|
||||
std::map<size_t, std::reference_wrapper<YaPluginMonolithImpl>>
|
||||
component_instances;
|
||||
std::mutex component_instances_mutex;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user