mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-16 05:33:07 +02:00
Implement the voice-info CLAP extension
This commit is contained in:
@@ -81,7 +81,8 @@ using ClapMainThreadControlRequest =
|
||||
clap::ext::params::plugin::ValueToText,
|
||||
clap::ext::params::plugin::TextToValue,
|
||||
clap::ext::state::plugin::Save,
|
||||
clap::ext::state::plugin::Load>;
|
||||
clap::ext::state::plugin::Load,
|
||||
clap::ext::voice_info::plugin::Get>;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s, ClapMainThreadControlRequest& payload) {
|
||||
@@ -177,7 +178,8 @@ using ClapMainThreadCallbackRequest =
|
||||
clap::ext::note_ports::host::Rescan,
|
||||
clap::ext::params::host::Rescan,
|
||||
clap::ext::params::host::Clear,
|
||||
clap::ext::state::host::MarkDirty>;
|
||||
clap::ext::state::host::MarkDirty,
|
||||
clap::ext::voice_info::host::Changed>;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s, ClapMainThreadCallbackRequest& payload) {
|
||||
|
||||
@@ -33,7 +33,7 @@ Yabridge currently tracks CLAP 1.1.1. The implementation status for CLAP's core
|
||||
| `clap.thread-check` | :heavy_check_mark: No bridging involved |
|
||||
| `clap.thread-pool` | :x: Not supported yet |
|
||||
| `clap.timer-support` | :x: Not supported yet |
|
||||
| `clap.voice-info` | :x: Not supported yet |
|
||||
| `clap.voice-info` | :heavy_check_mark: |
|
||||
|
||||
| draft extension | status |
|
||||
| -------------------------------- | --------------------- |
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <clap/ext/params.h>
|
||||
#include <clap/ext/state.h>
|
||||
#include <clap/ext/tail.h>
|
||||
#include <clap/ext/voice-info.h>
|
||||
|
||||
namespace clap {
|
||||
namespace host {
|
||||
@@ -35,7 +36,7 @@ Host::Host(const clap_host_t& original)
|
||||
url(original.url ? std::optional(original.url) : std::nullopt),
|
||||
version((assert(original.version), original.version)) {}
|
||||
|
||||
std::array<std::pair<bool, const char*>, 8> SupportedHostExtensions::list()
|
||||
std::array<std::pair<bool, const char*>, 9> SupportedHostExtensions::list()
|
||||
const noexcept {
|
||||
return {std::pair(supports_audio_ports, CLAP_EXT_AUDIO_PORTS),
|
||||
std::pair(supports_gui, CLAP_EXT_GUI),
|
||||
@@ -44,7 +45,8 @@ std::array<std::pair<bool, const char*>, 8> SupportedHostExtensions::list()
|
||||
std::pair(supports_note_ports, CLAP_EXT_NOTE_PORTS),
|
||||
std::pair(supports_params, CLAP_EXT_PARAMS),
|
||||
std::pair(supports_state, CLAP_EXT_STATE),
|
||||
std::pair(supports_tail, CLAP_EXT_TAIL)};
|
||||
std::pair(supports_tail, CLAP_EXT_TAIL),
|
||||
std::pair(supports_voice_info, CLAP_EXT_VOICE_INFO)};
|
||||
}
|
||||
|
||||
} // namespace host
|
||||
|
||||
@@ -89,12 +89,13 @@ struct SupportedHostExtensions {
|
||||
bool supports_params = false;
|
||||
bool supports_state = false;
|
||||
bool supports_tail = false;
|
||||
bool supports_voice_info = false;
|
||||
|
||||
/**
|
||||
* 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) {
|
||||
@@ -106,6 +107,7 @@ struct SupportedHostExtensions {
|
||||
s.value1b(supports_params);
|
||||
s.value1b(supports_state);
|
||||
s.value1b(supports_tail);
|
||||
s.value1b(supports_voice_info);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <clap/ext/params.h>
|
||||
#include <clap/ext/state.h>
|
||||
#include <clap/ext/tail.h>
|
||||
#include <clap/ext/voice-info.h>
|
||||
|
||||
#include "version.h"
|
||||
|
||||
@@ -82,7 +83,7 @@ const clap_plugin_descriptor_t* Descriptor::get() const {
|
||||
return &clap_descriptor;
|
||||
}
|
||||
|
||||
std::array<std::pair<bool, const char*>, 7> SupportedPluginExtensions::list()
|
||||
std::array<std::pair<bool, const char*>, 8> SupportedPluginExtensions::list()
|
||||
const noexcept {
|
||||
return {std::pair(supports_audio_ports, CLAP_EXT_AUDIO_PORTS),
|
||||
std::pair(supports_gui, CLAP_EXT_GUI),
|
||||
@@ -90,7 +91,8 @@ std::array<std::pair<bool, const char*>, 7> SupportedPluginExtensions::list()
|
||||
std::pair(supports_note_ports, CLAP_EXT_NOTE_PORTS),
|
||||
std::pair(supports_params, CLAP_EXT_PARAMS),
|
||||
std::pair(supports_state, CLAP_EXT_STATE),
|
||||
std::pair(supports_tail, CLAP_EXT_TAIL)};
|
||||
std::pair(supports_tail, CLAP_EXT_TAIL),
|
||||
std::pair(supports_voice_info, CLAP_EXT_VOICE_INFO)};
|
||||
}
|
||||
|
||||
} // namespace plugin
|
||||
|
||||
@@ -122,12 +122,13 @@ struct SupportedPluginExtensions {
|
||||
bool supports_params = false;
|
||||
bool supports_state = false;
|
||||
bool supports_tail = false;
|
||||
bool supports_voice_info = false;
|
||||
|
||||
/**
|
||||
* Get a list of `<bool, extension_name>` tuples for the supported
|
||||
* extensions. Used during logging.
|
||||
*/
|
||||
std::array<std::pair<bool, const char*>, 7> list() const noexcept;
|
||||
std::array<std::pair<bool, const char*>, 8> list() const noexcept;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
@@ -138,6 +139,7 @@ struct SupportedPluginExtensions {
|
||||
s.value1b(supports_params);
|
||||
s.value1b(supports_state);
|
||||
s.value1b(supports_tail);
|
||||
s.value1b(supports_voice_info);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user