mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 04:20:13 +02:00
Fully implement the state extension
This commit is contained in:
@@ -26,7 +26,7 @@ Yabridge currently tracks CLAP 1.1.1. The implementation status for CLAP's core
|
||||
| `clap.params` | :heavy_check_mark: |
|
||||
| `clap.posix-fd-support` | :x: Not supported yet |
|
||||
| `clap.render` | :x: Not supported yet |
|
||||
| `clap.state` | :x: Not supported yet |
|
||||
| `clap.state` | :heavy_check_mark: |
|
||||
| `clap.tail` | :heavy_check_mark: |
|
||||
| `clap.thread-check` | :x: Not supported yet |
|
||||
| `clap.thread-pool` | :x: Not supported yet |
|
||||
|
||||
@@ -68,6 +68,7 @@ struct Load {
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value8b(instance_id);
|
||||
s.object(stream);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <clap/ext/latency.h>
|
||||
#include <clap/ext/note-ports.h>
|
||||
#include <clap/ext/params.h>
|
||||
#include <clap/ext/state.h>
|
||||
#include <clap/ext/tail.h>
|
||||
|
||||
namespace clap {
|
||||
@@ -32,12 +33,13 @@ 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*>, 5> SupportedHostExtensions::list()
|
||||
std::array<std::pair<bool, const char*>, 6> SupportedHostExtensions::list()
|
||||
const noexcept {
|
||||
return {std::pair(supports_audio_ports, CLAP_EXT_AUDIO_PORTS),
|
||||
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_state, CLAP_EXT_STATE),
|
||||
std::pair(supports_tail, CLAP_EXT_TAIL)};
|
||||
}
|
||||
|
||||
|
||||
@@ -85,13 +85,14 @@ struct SupportedHostExtensions {
|
||||
bool supports_latency = false;
|
||||
bool supports_note_ports = false;
|
||||
bool supports_params = false;
|
||||
bool supports_state = 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*>, 5> list() const noexcept;
|
||||
std::array<std::pair<bool, const char*>, 6> list() const noexcept;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
@@ -99,6 +100,7 @@ struct SupportedHostExtensions {
|
||||
s.value1b(supports_latency);
|
||||
s.value1b(supports_note_ports);
|
||||
s.value1b(supports_params);
|
||||
s.value1b(supports_state);
|
||||
s.value1b(supports_tail);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <clap/ext/latency.h>
|
||||
#include <clap/ext/note-ports.h>
|
||||
#include <clap/ext/params.h>
|
||||
#include <clap/ext/state.h>
|
||||
#include <clap/ext/tail.h>
|
||||
|
||||
#include "version.h"
|
||||
@@ -80,12 +81,13 @@ const clap_plugin_descriptor_t* Descriptor::get() const {
|
||||
return &clap_descriptor;
|
||||
}
|
||||
|
||||
std::array<std::pair<bool, const char*>, 5> SupportedPluginExtensions::list()
|
||||
std::array<std::pair<bool, const char*>, 6> SupportedPluginExtensions::list()
|
||||
const noexcept {
|
||||
return {std::pair(supports_audio_ports, CLAP_EXT_AUDIO_PORTS),
|
||||
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_state, CLAP_EXT_STATE),
|
||||
std::pair(supports_tail, CLAP_EXT_TAIL)};
|
||||
}
|
||||
|
||||
|
||||
@@ -118,13 +118,14 @@ struct SupportedPluginExtensions {
|
||||
bool supports_latency = false;
|
||||
bool supports_note_ports = false;
|
||||
bool supports_params = false;
|
||||
bool supports_state = 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*>, 5> list() const noexcept;
|
||||
std::array<std::pair<bool, const char*>, 6> list() const noexcept;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
@@ -132,6 +133,7 @@ struct SupportedPluginExtensions {
|
||||
s.value1b(supports_latency);
|
||||
s.value1b(supports_note_ports);
|
||||
s.value1b(supports_params);
|
||||
s.value1b(supports_state);
|
||||
s.value1b(supports_tail);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user