Implement the CLAP render extension

This commit is contained in:
Robbert van der Helm
2022-10-10 16:08:26 +02:00
parent 0f7a5f8109
commit 0143d43c7e
8 changed files with 109 additions and 7 deletions
+2
View File
@@ -81,6 +81,8 @@ using ClapMainThreadControlRequest =
clap::ext::params::plugin::GetValue,
clap::ext::params::plugin::ValueToText,
clap::ext::params::plugin::TextToValue,
clap::ext::render::plugin::HasHardRealtimeRequirement,
clap::ext::render::plugin::Set,
clap::ext::state::plugin::Save,
clap::ext::state::plugin::Load,
clap::ext::voice_info::plugin::Get>;
+1 -1
View File
@@ -27,7 +27,7 @@ Yabridge currently tracks CLAP 1.1.1. The implementation status for CLAP's core
| `clap.note-ports` | :heavy_check_mark: |
| `clap.params` | :heavy_check_mark: |
| `clap.posix-fd-support` | :x: Not supported yet |
| `clap.render` | :x: Not supported yet |
| `clap.render` | :heavy_check_mark: |
| `clap.state` | :heavy_check_mark: |
| `clap.tail` | :heavy_check_mark: |
| `clap.thread-check` | :heavy_check_mark: No bridging involved |
+3 -1
View File
@@ -21,6 +21,7 @@
#include <clap/ext/latency.h>
#include <clap/ext/note-ports.h>
#include <clap/ext/params.h>
#include <clap/ext/render.h>
#include <clap/ext/state.h>
#include <clap/ext/tail.h>
#include <clap/ext/voice-info.h>
@@ -83,13 +84,14 @@ const clap_plugin_descriptor_t* Descriptor::get() const {
return &clap_descriptor;
}
std::array<std::pair<bool, const char*>, 8> SupportedPluginExtensions::list()
std::array<std::pair<bool, const char*>, 9> SupportedPluginExtensions::list()
const noexcept {
return {std::pair(supports_audio_ports, CLAP_EXT_AUDIO_PORTS),
std::pair(supports_gui, CLAP_EXT_GUI),
std::pair(supports_latency, CLAP_EXT_LATENCY),
std::pair(supports_note_ports, CLAP_EXT_NOTE_PORTS),
std::pair(supports_params, CLAP_EXT_PARAMS),
std::pair(supports_render, CLAP_EXT_RENDER),
std::pair(supports_state, CLAP_EXT_STATE),
std::pair(supports_tail, CLAP_EXT_TAIL),
std::pair(supports_voice_info, CLAP_EXT_VOICE_INFO)};
+3 -1
View File
@@ -120,6 +120,7 @@ struct SupportedPluginExtensions {
bool supports_latency = false;
bool supports_note_ports = false;
bool supports_params = false;
bool supports_render = false;
bool supports_state = false;
bool supports_tail = false;
bool supports_voice_info = false;
@@ -128,7 +129,7 @@ struct SupportedPluginExtensions {
* Get a list of `<bool, extension_name>` tuples for the supported
* extensions. Used during logging.
*/
std::array<std::pair<bool, const char*>, 8> list() const noexcept;
std::array<std::pair<bool, const char*>, 9> list() const noexcept;
template <typename S>
void serialize(S& s) {
@@ -137,6 +138,7 @@ struct SupportedPluginExtensions {
s.value1b(supports_latency);
s.value1b(supports_note_ports);
s.value1b(supports_params);
s.value1b(supports_render);
s.value1b(supports_state);
s.value1b(supports_tail);
s.value1b(supports_voice_info);