mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-09 20:29:10 +02:00
Add dedicated IAudioProcessor/IComponent sockets
This way every relevant object instance will get its own thread for handling these calls. The alternative would be creating a full fat Vst3MessageHandler pair for all object instances, but that would be a huge waste.
This commit is contained in:
+20
-10
@@ -76,13 +76,12 @@ class Vst3PluginBridge : PluginBridge<Vst3Sockets<std::jthread>> {
|
||||
/**
|
||||
* Add a `Vst3PluginProxyImpl` to the list of registered proxy objects so we
|
||||
* can handle host callbacks. This function is called in
|
||||
* `Vst3PluginProxyImpl`'s constructor.
|
||||
* `Vst3PluginProxyImpl`'s constructor. If the plugin supports the
|
||||
* `IAudioProcessor` or `IComponent` interfaces, then we'll also connect to
|
||||
* a dedicated audio processing socket.
|
||||
*
|
||||
* @param instance_id The instance ID generated by the plugin host when
|
||||
* instantiating the `IComponent`. Used as a stable name to refer to
|
||||
* these.
|
||||
* @param plugin_proxy The actual proxy object we can access its host
|
||||
* context.
|
||||
* @param proxy_object The proxy object so we can access its host context
|
||||
* and unique instance identifier.
|
||||
*
|
||||
* @see plugin_proxies
|
||||
*/
|
||||
@@ -93,13 +92,12 @@ class Vst3PluginBridge : PluginBridge<Vst3Sockets<std::jthread>> {
|
||||
* registered proxy objects. Called during the object's destructor after
|
||||
* asking the Wine plugin host to destroy the component on its side.
|
||||
*
|
||||
* @param instance_id The instance ID generated by the plugin host when
|
||||
* instantiating the `IComponent`. Used as a stable name to refer to
|
||||
* these.
|
||||
* @param proxy_object The proxy object so we can access its unique instance
|
||||
* identifier.
|
||||
*
|
||||
* @see plugin_proxies
|
||||
*/
|
||||
void unregister_plugin_proxy(size_t instance_id);
|
||||
void unregister_plugin_proxy(Vst3PluginProxyImpl& proxy_object);
|
||||
|
||||
/**
|
||||
* Send a control message to the Wine plugin host return the response. This
|
||||
@@ -112,6 +110,18 @@ class Vst3PluginBridge : PluginBridge<Vst3Sockets<std::jthread>> {
|
||||
object, std::pair<Vst3Logger&, bool>(logger, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an `IAudioProcessor` or `IComponent` control message to a specific
|
||||
* plugin instance. This is separated from the above `send_message()` for
|
||||
* performance reasons, as this way every instance has its own dedicated
|
||||
* socket and thread.
|
||||
*/
|
||||
template <typename T>
|
||||
typename T::Response send_audio_processor_message(const T& object) {
|
||||
return sockets.send_audio_processor_message(
|
||||
object, std::pair<Vst3Logger&, bool>(logger, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* The logging facility used for this instance of yabridge. Wraps around
|
||||
* `PluginBridge::generic_logger`.
|
||||
|
||||
Reference in New Issue
Block a user