mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-09 20:29:10 +02:00
Capitalize CLAP plugin descriptor class name
To stay consistent with the rest of the naming.
This commit is contained in:
@@ -31,7 +31,7 @@ struct ListResponse {
|
|||||||
* The descriptors for the plugins in the factory. This will be a nullopt if
|
* The descriptors for the plugins in the factory. This will be a nullopt if
|
||||||
* the plugin does not support the plugin factory.
|
* the plugin does not support the plugin factory.
|
||||||
*/
|
*/
|
||||||
std::optional<std::vector<clap::plugin::descriptor>> descriptors;
|
std::optional<std::vector<clap::plugin::Descriptor>> descriptors;
|
||||||
|
|
||||||
template <typename S>
|
template <typename S>
|
||||||
void serialize(S& s) {
|
void serialize(S& s) {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
namespace clap {
|
namespace clap {
|
||||||
namespace plugin {
|
namespace plugin {
|
||||||
|
|
||||||
descriptor::descriptor(const clap_plugin_descriptor_t& original)
|
Descriptor::Descriptor(const clap_plugin_descriptor_t& original)
|
||||||
: clap_version(original.clap_version),
|
: clap_version(original.clap_version),
|
||||||
id((assert(original.id), original.id)),
|
id((assert(original.id), original.id)),
|
||||||
name((assert(original.name), original.name)),
|
name((assert(original.name), original.name)),
|
||||||
@@ -45,7 +45,7 @@ descriptor::descriptor(const clap_plugin_descriptor_t& original)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const clap_plugin_descriptor_t* descriptor::get() const {
|
const clap_plugin_descriptor_t* Descriptor::get() const {
|
||||||
// This should be the minimum of yabridge's supported CLAP version and
|
// This should be the minimum of yabridge's supported CLAP version and
|
||||||
// the plugin's supported CLAP version
|
// the plugin's supported CLAP version
|
||||||
clap_version_t supported_clap_version = clamp_clap_version(clap_version);
|
clap_version_t supported_clap_version = clamp_clap_version(clap_version);
|
||||||
|
|||||||
@@ -33,17 +33,17 @@ namespace plugin {
|
|||||||
/**
|
/**
|
||||||
* Owned wrapper around `clap_plugin_descriptor` for serialization purposes.
|
* Owned wrapper around `clap_plugin_descriptor` for serialization purposes.
|
||||||
*/
|
*/
|
||||||
struct descriptor {
|
struct Descriptor {
|
||||||
/**
|
/**
|
||||||
* Parse a plugin-provided descriptor so it can be serialized and sent to
|
* Parse a plugin-provided descriptor so it can be serialized and sent to
|
||||||
* the native CLAP plugin.
|
* the native CLAP plugin.
|
||||||
*/
|
*/
|
||||||
descriptor(const clap_plugin_descriptor_t& original);
|
Descriptor(const clap_plugin_descriptor_t& original);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default constructor for bitsery.
|
* Default constructor for bitsery.
|
||||||
*/
|
*/
|
||||||
descriptor() {}
|
Descriptor() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We'll report the maximum of the plugin's supported CLAP version and
|
* We'll report the maximum of the plugin's supported CLAP version and
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
clap_plugin_factory_proxy::clap_plugin_factory_proxy(
|
clap_plugin_factory_proxy::clap_plugin_factory_proxy(
|
||||||
ClapPluginBridge& bridge,
|
ClapPluginBridge& bridge,
|
||||||
std::vector<clap::plugin::descriptor> descriptors)
|
std::vector<clap::plugin::Descriptor> descriptors)
|
||||||
: plugin_factory_vtable(clap_plugin_factory_t{
|
: plugin_factory_vtable(clap_plugin_factory_t{
|
||||||
.get_plugin_count = plugin_factory_get_plugin_count,
|
.get_plugin_count = plugin_factory_get_plugin_count,
|
||||||
.get_plugin_descriptor = plugin_factory_get_plugin_descriptor,
|
.get_plugin_descriptor = plugin_factory_get_plugin_descriptor,
|
||||||
|
|||||||
@@ -34,6 +34,11 @@ class clap_plugin_factory_proxy {
|
|||||||
* The vtable for `clap_plugin_factory`, requires that this object is never
|
* The vtable for `clap_plugin_factory`, requires that this object is never
|
||||||
* moved or copied. This is positioned at the start of the struct so we can
|
* moved or copied. This is positioned at the start of the struct so we can
|
||||||
* cast between them (with only a bit of UB).
|
* cast between them (with only a bit of UB).
|
||||||
|
*
|
||||||
|
* NOTE: CLAP does not provide a user pointer field for this vtable like it
|
||||||
|
* does with other types because it expects the factory to be a
|
||||||
|
* statically initialized singleton. That's why we need to do this
|
||||||
|
* cast instead.
|
||||||
*/
|
*/
|
||||||
const clap_plugin_factory_t plugin_factory_vtable;
|
const clap_plugin_factory_t plugin_factory_vtable;
|
||||||
|
|
||||||
@@ -43,7 +48,7 @@ class clap_plugin_factory_proxy {
|
|||||||
*/
|
*/
|
||||||
clap_plugin_factory_proxy(
|
clap_plugin_factory_proxy(
|
||||||
ClapPluginBridge& bridge,
|
ClapPluginBridge& bridge,
|
||||||
std::vector<clap::plugin::descriptor> descriptors);
|
std::vector<clap::plugin::Descriptor> descriptors);
|
||||||
|
|
||||||
clap_plugin_factory_proxy(const clap_plugin_factory_proxy&) = delete;
|
clap_plugin_factory_proxy(const clap_plugin_factory_proxy&) = delete;
|
||||||
clap_plugin_factory_proxy& operator=(const clap_plugin_factory_proxy&) =
|
clap_plugin_factory_proxy& operator=(const clap_plugin_factory_proxy&) =
|
||||||
@@ -65,5 +70,5 @@ class clap_plugin_factory_proxy {
|
|||||||
private:
|
private:
|
||||||
ClapPluginBridge& bridge_;
|
ClapPluginBridge& bridge_;
|
||||||
|
|
||||||
std::vector<clap::plugin::descriptor> descriptors_;
|
std::vector<clap::plugin::Descriptor> descriptors_;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ void ClapBridge::run() {
|
|||||||
.descriptors = std::nullopt};
|
.descriptors = std::nullopt};
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<clap::plugin::descriptor> descriptors;
|
std::vector<clap::plugin::Descriptor> descriptors;
|
||||||
const uint32_t num_plugins =
|
const uint32_t num_plugins =
|
||||||
(factory->get_plugin_count)(factory);
|
(factory->get_plugin_count)(factory);
|
||||||
for (uint32_t i = 0; i < num_plugins; i++) {
|
for (uint32_t i = 0; i < num_plugins; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user