mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-14 20:40:03 +02:00
Store plugin and host extension struct pointers
This commit is contained in:
@@ -29,6 +29,29 @@
|
||||
// Forward declaration to avoid circular includes
|
||||
class ClapPluginBridge;
|
||||
|
||||
/**
|
||||
* Pointers to all of a CLAP host's extension structs. These will be null if the
|
||||
* host doesn't support the extensions.
|
||||
*
|
||||
* @relates clap_plugin_proxy
|
||||
*/
|
||||
struct ClapHostExtensions {
|
||||
/**
|
||||
* Query all of the host's extensions. This can only be done after the
|
||||
* call to init.
|
||||
*/
|
||||
ClapHostExtensions(const clap_host& host) noexcept;
|
||||
|
||||
/**
|
||||
* The default constructor that assumes the host doesn't support any
|
||||
* extensions. We may only query the extensions after the plugin has called
|
||||
* `clap_plugin::init()`.
|
||||
*/
|
||||
ClapHostExtensions() noexcept;
|
||||
|
||||
const clap_host_audio_ports_t* audio_ports = nullptr;
|
||||
};
|
||||
|
||||
/**
|
||||
* A proxy for a `clap_plugin`.
|
||||
*/
|
||||
@@ -131,10 +154,16 @@ class clap_plugin_proxy {
|
||||
|
||||
/**
|
||||
* The `clap_host_t*` passed when creating the instance. Any callbacks made
|
||||
* by the proxied plugin instance must go through ere.
|
||||
* by the proxied plugin instance must go through here.
|
||||
*/
|
||||
const clap_host_t* host_;
|
||||
|
||||
/**
|
||||
* The host's supported extensions. These will be populated in the
|
||||
* `clap_plugin::init()` call.
|
||||
*/
|
||||
ClapHostExtensions extensions_;
|
||||
|
||||
private:
|
||||
ClapPluginBridge& bridge_;
|
||||
size_t instance_id_;
|
||||
|
||||
Reference in New Issue
Block a user