mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 20:40:11 +02:00
Implement host side of the note-name extension
This commit is contained in:
@@ -183,6 +183,7 @@ using ClapMainThreadCallbackRequest =
|
||||
clap::ext::gui::host::RequestShow,
|
||||
clap::ext::gui::host::RequestHide,
|
||||
clap::ext::gui::host::Closed,
|
||||
clap::ext::note_name::host::Changed,
|
||||
clap::ext::note_ports::host::SupportedDialects,
|
||||
clap::ext::note_ports::host::Rescan,
|
||||
clap::ext::params::host::Rescan,
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <clap/ext/gui.h>
|
||||
#include <clap/ext/latency.h>
|
||||
#include <clap/ext/log.h>
|
||||
#include <clap/ext/note-name.h>
|
||||
#include <clap/ext/note-ports.h>
|
||||
#include <clap/ext/params.h>
|
||||
#include <clap/ext/state.h>
|
||||
@@ -37,13 +38,14 @@ 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*>, 10> SupportedHostExtensions::list()
|
||||
std::array<std::pair<bool, const char*>, 11> SupportedHostExtensions::list()
|
||||
const noexcept {
|
||||
return {std::pair(supports_audio_ports, CLAP_EXT_AUDIO_PORTS),
|
||||
std::pair(supports_audio_ports_config, CLAP_EXT_AUDIO_PORTS_CONFIG),
|
||||
std::pair(supports_gui, CLAP_EXT_GUI),
|
||||
std::pair(supports_latency, CLAP_EXT_LATENCY),
|
||||
std::pair(supports_log, CLAP_EXT_LOG),
|
||||
std::pair(supports_note_name, CLAP_EXT_NOTE_NAME),
|
||||
std::pair(supports_note_ports, CLAP_EXT_NOTE_PORTS),
|
||||
std::pair(supports_params, CLAP_EXT_PARAMS),
|
||||
std::pair(supports_state, CLAP_EXT_STATE),
|
||||
|
||||
@@ -86,6 +86,7 @@ struct SupportedHostExtensions {
|
||||
bool supports_gui = false;
|
||||
bool supports_latency = false;
|
||||
bool supports_log = false;
|
||||
bool supports_note_name = false;
|
||||
bool supports_note_ports = false;
|
||||
bool supports_params = false;
|
||||
bool supports_state = false;
|
||||
@@ -96,7 +97,7 @@ struct SupportedHostExtensions {
|
||||
* Get a list of `<bool, extension_name>` tuples for the supported
|
||||
* extensions. Used during logging.
|
||||
*/
|
||||
std::array<std::pair<bool, const char*>, 10> list() const noexcept;
|
||||
std::array<std::pair<bool, const char*>, 11> list() const noexcept;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
@@ -105,6 +106,7 @@ struct SupportedHostExtensions {
|
||||
s.value1b(supports_gui);
|
||||
s.value1b(supports_latency);
|
||||
s.value1b(supports_log);
|
||||
s.value1b(supports_note_name);
|
||||
s.value1b(supports_note_ports);
|
||||
s.value1b(supports_params);
|
||||
s.value1b(supports_state);
|
||||
|
||||
Reference in New Issue
Block a user