mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-22 20:07:28 +02:00
Update to CLAP 1.1.7
Factories got moved to a new `factory` directory.
This commit is contained in:
@@ -14,6 +14,10 @@ Versioning](https://semver.org/spec/v2.0.0.html).
|
|||||||
version comparison function considers `8.0` to be a lower version than
|
version comparison function considers `8.0` to be a lower version than
|
||||||
`8.0rc2`.
|
`8.0rc2`.
|
||||||
|
|
||||||
|
### Packaging notes
|
||||||
|
|
||||||
|
- The CLAP dependency has been updated to target version 1.1.7.
|
||||||
|
|
||||||
## [5.0.3] - 2022-12-23
|
## [5.0.3] - 2022-12-23
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
@@ -808,7 +808,7 @@ The following dependencies are included in the repository as a Meson wrap:
|
|||||||
- Version 3.7.7 of the [VST3 SDK](https://github.com/robbert-vdh/vst3sdk) with
|
- Version 3.7.7 of the [VST3 SDK](https://github.com/robbert-vdh/vst3sdk) with
|
||||||
some [patches](https://github.com/robbert-vdh/yabridge/blob/master/tools/patch-vst3-sdk.sh)
|
some [patches](https://github.com/robbert-vdh/yabridge/blob/master/tools/patch-vst3-sdk.sh)
|
||||||
to allow Winelib compilation
|
to allow Winelib compilation
|
||||||
- Version 1.1.4 of the [CLAP headers](https://github.com/free-audio/clap).
|
- Version 1.1.7 of the [CLAP headers](https://github.com/free-audio/clap).
|
||||||
|
|
||||||
The project can then be compiled with the command below. You can remove or
|
The project can then be compiled with the command below. You can remove or
|
||||||
change the unity size argument if building takes up too much RAM, or you can
|
change the unity size argument if building takes up too much RAM, or you can
|
||||||
|
|||||||
+1
-2
@@ -278,8 +278,7 @@ wine_threads_dep = declare_dependency(link_args : '-lpthread')
|
|||||||
wine_uuid_dep = declare_dependency(link_args : '-luuid')
|
wine_uuid_dep = declare_dependency(link_args : '-luuid')
|
||||||
|
|
||||||
if with_clap
|
if with_clap
|
||||||
# 1.1.3 should be API compatible with 1.1.4
|
clap_dep = dependency('clap', version : '==1.1.7')
|
||||||
clap_dep = dependency('clap', version : '>=1.1.3')
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# We need to build the VST3 SDK dependencies in tree because Meson won't let us
|
# We need to build the VST3 SDK dependencies in tree because Meson won't let us
|
||||||
|
|||||||
@@ -54,14 +54,14 @@ void ClapLogger::log_on_main_thread(size_t instance_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool ClapLogger::log_request(bool is_host_plugin,
|
bool ClapLogger::log_request(bool is_host_plugin,
|
||||||
const clap::plugin_factory::List&) {
|
const clap::factory::plugin_factory::List&) {
|
||||||
return log_request_base(is_host_plugin, [&](auto& message) {
|
return log_request_base(is_host_plugin, [&](auto& message) {
|
||||||
message << "clap_plugin_factory::list()";
|
message << "clap_plugin_factory::list()";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ClapLogger::log_request(bool is_host_plugin,
|
bool ClapLogger::log_request(bool is_host_plugin,
|
||||||
const clap::plugin_factory::Create& request) {
|
const clap::factory::plugin_factory::Create& request) {
|
||||||
return log_request_base(is_host_plugin, [&](auto& message) {
|
return log_request_base(is_host_plugin, [&](auto& message) {
|
||||||
message << "clap_plugin_factory::create(host = <clap_host_t*>, "
|
message << "clap_plugin_factory::create(host = <clap_host_t*>, "
|
||||||
"plugin_id = \""
|
"plugin_id = \""
|
||||||
@@ -769,7 +769,7 @@ void ClapLogger::log_response(bool is_host_plugin, const Ack&) {
|
|||||||
|
|
||||||
void ClapLogger::log_response(
|
void ClapLogger::log_response(
|
||||||
bool is_host_plugin,
|
bool is_host_plugin,
|
||||||
const clap::plugin_factory::ListResponse& response) {
|
const clap::factory::plugin_factory::ListResponse& response) {
|
||||||
log_response_base(is_host_plugin, [&](auto& message) {
|
log_response_base(is_host_plugin, [&](auto& message) {
|
||||||
if (response.descriptors) {
|
if (response.descriptors) {
|
||||||
message << "<clap_plugin_factory* containing "
|
message << "<clap_plugin_factory* containing "
|
||||||
@@ -782,7 +782,7 @@ void ClapLogger::log_response(
|
|||||||
|
|
||||||
void ClapLogger::log_response(
|
void ClapLogger::log_response(
|
||||||
bool is_host_plugin,
|
bool is_host_plugin,
|
||||||
const clap::plugin_factory::CreateResponse& response) {
|
const clap::factory::plugin_factory::CreateResponse& response) {
|
||||||
log_response_base(is_host_plugin, [&](auto& message) {
|
log_response_base(is_host_plugin, [&](auto& message) {
|
||||||
if (response.instance_id) {
|
if (response.instance_id) {
|
||||||
message << "<clap_plugin_t* with instance ID "
|
message << "<clap_plugin_t* with instance ID "
|
||||||
|
|||||||
@@ -80,8 +80,8 @@ class ClapLogger {
|
|||||||
// log message for the response together with the request.
|
// log message for the response together with the request.
|
||||||
|
|
||||||
// Main thread control messages
|
// Main thread control messages
|
||||||
bool log_request(bool is_host_plugin, const clap::plugin_factory::List&);
|
bool log_request(bool is_host_plugin, const clap::factory::plugin_factory::List&);
|
||||||
bool log_request(bool is_host_plugin, const clap::plugin_factory::Create&);
|
bool log_request(bool is_host_plugin, const clap::factory::plugin_factory::Create&);
|
||||||
bool log_request(bool is_host_plugin, const clap::plugin::Init&);
|
bool log_request(bool is_host_plugin, const clap::plugin::Init&);
|
||||||
bool log_request(bool is_host_plugin, const clap::plugin::Destroy&);
|
bool log_request(bool is_host_plugin, const clap::plugin::Destroy&);
|
||||||
bool log_request(bool is_host_plugin, const clap::plugin::Activate&);
|
bool log_request(bool is_host_plugin, const clap::plugin::Activate&);
|
||||||
@@ -207,9 +207,9 @@ class ClapLogger {
|
|||||||
// Main thread control message responses
|
// Main thread control message responses
|
||||||
void log_response(bool is_host_plugin, const Ack&);
|
void log_response(bool is_host_plugin, const Ack&);
|
||||||
void log_response(bool is_host_plugin,
|
void log_response(bool is_host_plugin,
|
||||||
const clap::plugin_factory::ListResponse&);
|
const clap::factory::plugin_factory::ListResponse&);
|
||||||
void log_response(bool is_host_plugin,
|
void log_response(bool is_host_plugin,
|
||||||
const clap::plugin_factory::CreateResponse&);
|
const clap::factory::plugin_factory::CreateResponse&);
|
||||||
void log_response(bool is_host_plugin, const clap::plugin::InitResponse&);
|
void log_response(bool is_host_plugin, const clap::plugin::InitResponse&);
|
||||||
void log_response(bool is_host_plugin,
|
void log_response(bool is_host_plugin,
|
||||||
const clap::plugin::ActivateResponse&);
|
const clap::plugin::ActivateResponse&);
|
||||||
|
|||||||
@@ -35,8 +35,8 @@
|
|||||||
#include "clap/ext/state.h"
|
#include "clap/ext/state.h"
|
||||||
#include "clap/ext/tail.h"
|
#include "clap/ext/tail.h"
|
||||||
#include "clap/ext/voice-info.h"
|
#include "clap/ext/voice-info.h"
|
||||||
|
#include "clap/factory/plugin-factory.h"
|
||||||
#include "clap/host.h"
|
#include "clap/host.h"
|
||||||
#include "clap/plugin-factory.h"
|
|
||||||
#include "clap/process.h"
|
#include "clap/process.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
@@ -55,8 +55,8 @@
|
|||||||
// serialize this without it.
|
// serialize this without it.
|
||||||
using ClapMainThreadControlRequest =
|
using ClapMainThreadControlRequest =
|
||||||
std::variant<WantsConfiguration,
|
std::variant<WantsConfiguration,
|
||||||
clap::plugin_factory::List,
|
clap::factory::plugin_factory::List,
|
||||||
clap::plugin_factory::Create,
|
clap::factory::plugin_factory::Create,
|
||||||
clap::plugin::Init,
|
clap::plugin::Init,
|
||||||
clap::plugin::Destroy,
|
clap::plugin::Destroy,
|
||||||
clap::plugin::Activate,
|
clap::plugin::Activate,
|
||||||
|
|||||||
+9
-5
@@ -16,17 +16,19 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../../common.h"
|
||||||
#include "host.h"
|
#include "../host.h"
|
||||||
#include "plugin.h"
|
#include "../plugin.h"
|
||||||
|
|
||||||
// Serialization messages for `clap/plugin-factory.h`
|
// Serialization messages for `clap/plugin-factory.h`
|
||||||
|
|
||||||
namespace clap {
|
namespace clap {
|
||||||
|
namespace factory {
|
||||||
namespace plugin_factory {
|
namespace plugin_factory {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The response to the `clap::plugin_factory::List` message defined below.
|
* The response to the `clap::factory::plugin_factory::List` message defined
|
||||||
|
* below.
|
||||||
*/
|
*/
|
||||||
struct ListResponse {
|
struct ListResponse {
|
||||||
/**
|
/**
|
||||||
@@ -57,7 +59,8 @@ struct List {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The response to the `clap::plugin_factory::Create` message defined below.
|
* The response to the `clap::factory::plugin_factory::Create` message defined
|
||||||
|
* below.
|
||||||
*/
|
*/
|
||||||
struct CreateResponse {
|
struct CreateResponse {
|
||||||
/**
|
/**
|
||||||
@@ -99,4 +102,5 @@ struct Create {
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace plugin_factory
|
} // namespace plugin_factory
|
||||||
|
} // namespace factory
|
||||||
} // namespace clap
|
} // namespace clap
|
||||||
@@ -76,8 +76,8 @@ clap_plugin_factory_proxy::plugin_factory_create_plugin(
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const clap::plugin_factory::CreateResponse response =
|
const clap::factory::plugin_factory::CreateResponse response =
|
||||||
self->bridge_.send_main_thread_message(clap::plugin_factory::Create{
|
self->bridge_.send_main_thread_message(clap::factory::plugin_factory::Create{
|
||||||
.host = *host, .plugin_id = plugin_id});
|
.host = *host, .plugin_id = plugin_id});
|
||||||
if (response.instance_id) {
|
if (response.instance_id) {
|
||||||
// This plugin proxy is tied to the instance ID created on the Wine
|
// This plugin proxy is tied to the instance ID created on the Wine
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <clap/plugin-factory.h>
|
#include <clap/factory/plugin-factory.h>
|
||||||
|
|
||||||
#include "../../common/serialization/clap/plugin.h"
|
#include "../../common/serialization/clap/plugin.h"
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ class clap_plugin_factory_proxy {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct the plugin factory proxy based on the plugin descriptors
|
* Construct the plugin factory proxy based on the plugin descriptors
|
||||||
* retrieved from a `clap::plugin_factory::ListReponse`.
|
* retrieved from a `clap::factory::plugin_factory::ListReponse`.
|
||||||
*/
|
*/
|
||||||
clap_plugin_factory_proxy(
|
clap_plugin_factory_proxy(
|
||||||
ClapPluginBridge& bridge,
|
ClapPluginBridge& bridge,
|
||||||
|
|||||||
@@ -332,8 +332,8 @@ const void* ClapPluginBridge::get_factory(const char* factory_id) {
|
|||||||
if (!plugin_factory_) {
|
if (!plugin_factory_) {
|
||||||
// If the plugin does not support this factory type, then we'll also
|
// If the plugin does not support this factory type, then we'll also
|
||||||
// return a null poitner
|
// return a null poitner
|
||||||
const clap::plugin_factory::ListResponse response =
|
const clap::factory::plugin_factory::ListResponse response =
|
||||||
send_main_thread_message(clap::plugin_factory::List{});
|
send_main_thread_message(clap::factory::plugin_factory::List{});
|
||||||
if (!response.descriptors) {
|
if (!response.descriptors) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
#include <asio/steady_timer.hpp>
|
#include <asio/steady_timer.hpp>
|
||||||
|
|
||||||
#include "../../common/serialization/clap/plugin-factory.h"
|
#include "../../common/serialization/clap/factory/plugin-factory.h"
|
||||||
|
|
||||||
// Forward declaration to avoid circular includes
|
// Forward declaration to avoid circular includes
|
||||||
class ClapBridge;
|
class ClapBridge;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
#include <codecvt>
|
#include <codecvt>
|
||||||
#include <locale>
|
#include <locale>
|
||||||
|
|
||||||
#include <clap/plugin-factory.h>
|
#include <clap/factory/plugin-factory.h>
|
||||||
|
|
||||||
// Generated inside of the build directory
|
// Generated inside of the build directory
|
||||||
#include <version.h>
|
#include <version.h>
|
||||||
@@ -183,15 +183,15 @@ void ClapBridge::run() {
|
|||||||
// variant without it.
|
// variant without it.
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
[&](const clap::plugin_factory::List&)
|
[&](const clap::factory::plugin_factory::List&)
|
||||||
-> clap::plugin_factory::List::Response {
|
-> clap::factory::plugin_factory::List::Response {
|
||||||
return main_context_
|
return main_context_
|
||||||
.run_in_context([&]() {
|
.run_in_context([&]() {
|
||||||
plugin_factory_ =
|
plugin_factory_ =
|
||||||
static_cast<const clap_plugin_factory_t*>(
|
static_cast<const clap_plugin_factory_t*>(
|
||||||
entry_->get_factory(CLAP_PLUGIN_FACTORY_ID));
|
entry_->get_factory(CLAP_PLUGIN_FACTORY_ID));
|
||||||
if (!plugin_factory_) {
|
if (!plugin_factory_) {
|
||||||
return clap::plugin_factory::ListResponse{
|
return clap::factory::plugin_factory::ListResponse{
|
||||||
.descriptors = std::nullopt};
|
.descriptors = std::nullopt};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -214,13 +214,13 @@ void ClapBridge::run() {
|
|||||||
descriptors.push_back(*descriptor);
|
descriptors.push_back(*descriptor);
|
||||||
}
|
}
|
||||||
|
|
||||||
return clap::plugin_factory::ListResponse{
|
return clap::factory::plugin_factory::ListResponse{
|
||||||
.descriptors = descriptors};
|
.descriptors = descriptors};
|
||||||
})
|
})
|
||||||
.get();
|
.get();
|
||||||
},
|
},
|
||||||
[&](clap::plugin_factory::Create& request)
|
[&](clap::factory::plugin_factory::Create& request)
|
||||||
-> clap::plugin_factory::Create::Response {
|
-> clap::factory::plugin_factory::Create::Response {
|
||||||
return main_context_
|
return main_context_
|
||||||
.run_in_context([&]() {
|
.run_in_context([&]() {
|
||||||
// This assertion should never be hit, but you can never
|
// This assertion should never be hit, but you can never
|
||||||
@@ -241,10 +241,10 @@ void ClapBridge::run() {
|
|||||||
if (plugin) {
|
if (plugin) {
|
||||||
register_plugin_instance(plugin,
|
register_plugin_instance(plugin,
|
||||||
std::move(host_proxy));
|
std::move(host_proxy));
|
||||||
return clap::plugin_factory::CreateResponse{
|
return clap::factory::plugin_factory::CreateResponse{
|
||||||
.instance_id = instance_id};
|
.instance_id = instance_id};
|
||||||
} else {
|
} else {
|
||||||
return clap::plugin_factory::CreateResponse{
|
return clap::factory::plugin_factory::CreateResponse{
|
||||||
.instance_id = std::nullopt};
|
.instance_id = std::nullopt};
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <clap/entry.h>
|
#include <clap/entry.h>
|
||||||
#include <clap/plugin-factory.h>
|
#include <clap/factory/plugin-factory.h>
|
||||||
#include <clap/plugin.h>
|
#include <clap/plugin.h>
|
||||||
|
|
||||||
#include "../../common/audio-shm.h"
|
#include "../../common/audio-shm.h"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[wrap-git]
|
[wrap-git]
|
||||||
url = https://github.com/free-audio/clap.git
|
url = https://github.com/free-audio/clap.git
|
||||||
# This is tag 1.1.4
|
# This is tag 1.1.7
|
||||||
revision = 650ad6a6b0215b3f964c49a004667ad876689dfd
|
revision = 065d685d4e9657f0344f350eef748be2b4d8e318
|
||||||
depth = 1
|
depth = 1
|
||||||
patch_directory = clap
|
patch_directory = clap
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
project('clap', 'cpp', version : '1.1.4')
|
project('clap', 'cpp', version : '1.1.7')
|
||||||
|
|
||||||
clap_dep = declare_dependency(include_directories : include_directories('include'))
|
clap_dep = declare_dependency(include_directories : include_directories('include'))
|
||||||
|
|||||||
Reference in New Issue
Block a user