mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-14 12:30:00 +02:00
Fully implement the CLAP tail extension
Trivial extension, but this required us to be able to send audio thread callbacks first.
This commit is contained in:
@@ -97,7 +97,8 @@ struct ClapAudioThreadControlRequest {
|
||||
using Payload = std::variant<clap::plugin::StartProcessing,
|
||||
clap::plugin::StopProcessing,
|
||||
clap::plugin::Reset,
|
||||
clap::ext::params::plugin::Flush>;
|
||||
clap::ext::params::plugin::Flush,
|
||||
clap::ext::tail::plugin::Get>;
|
||||
|
||||
Payload payload;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ Yabridge currently tracks CLAP 1.1.1. The implementation status for CLAP's core
|
||||
| `clap.posix-fd-support` | :x: Not supported yet |
|
||||
| `clap.render` | :x: Not supported yet |
|
||||
| `clap.state` | :x: Not supported yet |
|
||||
| `clap.tail` | :x: Not supported yet |
|
||||
| `clap.tail` | :heavy_check_mark: |
|
||||
| `clap.thread-check` | :x: Not supported yet |
|
||||
| `clap.thread-pool` | :x: Not supported yet |
|
||||
| `clap.timer-support` | :x: Not supported yet |
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <clap/ext/audio-ports.h>
|
||||
#include <clap/ext/note-ports.h>
|
||||
#include <clap/ext/params.h>
|
||||
#include <clap/ext/tail.h>
|
||||
|
||||
namespace clap {
|
||||
namespace host {
|
||||
@@ -30,11 +31,12 @@ 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*>, 3> SupportedHostExtensions::list()
|
||||
std::array<std::pair<bool, const char*>, 4> SupportedHostExtensions::list()
|
||||
const noexcept {
|
||||
return {std::pair(supports_audio_ports, CLAP_EXT_AUDIO_PORTS),
|
||||
std::pair(supports_note_ports, CLAP_EXT_NOTE_PORTS),
|
||||
std::pair(supports_params, CLAP_EXT_PARAMS)};
|
||||
std::pair(supports_params, CLAP_EXT_PARAMS),
|
||||
std::pair(supports_tail, CLAP_EXT_TAIL)};
|
||||
}
|
||||
|
||||
} // namespace host
|
||||
|
||||
@@ -84,18 +84,20 @@ struct SupportedHostExtensions {
|
||||
bool supports_audio_ports = false;
|
||||
bool supports_note_ports = false;
|
||||
bool supports_params = false;
|
||||
bool supports_tail = false;
|
||||
|
||||
/**
|
||||
* Get a list of `<bool, extension_name>` tuples for the supported
|
||||
* extensions. Used during logging.
|
||||
*/
|
||||
std::array<std::pair<bool, const char*>, 3> list() const noexcept;
|
||||
std::array<std::pair<bool, const char*>, 4> list() const noexcept;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value1b(supports_audio_ports);
|
||||
s.value1b(supports_note_ports);
|
||||
s.value1b(supports_params);
|
||||
s.value1b(supports_tail);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <clap/ext/audio-ports.h>
|
||||
#include <clap/ext/note-ports.h>
|
||||
#include <clap/ext/params.h>
|
||||
#include <clap/ext/tail.h>
|
||||
|
||||
#include "version.h"
|
||||
|
||||
@@ -78,11 +79,12 @@ const clap_plugin_descriptor_t* Descriptor::get() const {
|
||||
return &clap_descriptor;
|
||||
}
|
||||
|
||||
std::array<std::pair<bool, const char*>, 3> SupportedPluginExtensions::list()
|
||||
std::array<std::pair<bool, const char*>, 4> SupportedPluginExtensions::list()
|
||||
const noexcept {
|
||||
return {std::pair(supports_audio_ports, CLAP_EXT_AUDIO_PORTS),
|
||||
std::pair(supports_note_ports, CLAP_EXT_NOTE_PORTS),
|
||||
std::pair(supports_params, CLAP_EXT_PARAMS)};
|
||||
std::pair(supports_params, CLAP_EXT_PARAMS),
|
||||
std::pair(supports_tail, CLAP_EXT_TAIL)};
|
||||
}
|
||||
|
||||
} // namespace plugin
|
||||
|
||||
@@ -117,6 +117,7 @@ struct SupportedPluginExtensions {
|
||||
bool supports_audio_ports = false;
|
||||
bool supports_note_ports = false;
|
||||
bool supports_params = false;
|
||||
bool supports_tail = false;
|
||||
|
||||
/**
|
||||
* Get a list of `<bool, extension_name>` tuples for the supported
|
||||
@@ -129,6 +130,7 @@ struct SupportedPluginExtensions {
|
||||
s.value1b(supports_audio_ports);
|
||||
s.value1b(supports_note_ports);
|
||||
s.value1b(supports_params);
|
||||
s.value1b(supports_tail);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user