mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Add a CLAP plugin type
These aren't handled anywhere yet
This commit is contained in:
@@ -69,7 +69,9 @@ LibArchitecture find_dll_architecture(const fs::path& plugin_path) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PluginType plugin_type_from_string(const std::string& plugin_type) noexcept {
|
PluginType plugin_type_from_string(const std::string& plugin_type) noexcept {
|
||||||
if (plugin_type == "VST2") {
|
if (plugin_type == "CLAP") {
|
||||||
|
return PluginType::clap;
|
||||||
|
} else if (plugin_type == "VST2") {
|
||||||
return PluginType::vst2;
|
return PluginType::vst2;
|
||||||
} else if (plugin_type == "VST3") {
|
} else if (plugin_type == "VST3") {
|
||||||
return PluginType::vst3;
|
return PluginType::vst3;
|
||||||
@@ -81,7 +83,9 @@ PluginType plugin_type_from_string(const std::string& plugin_type) noexcept {
|
|||||||
std::string plugin_type_to_string(const PluginType& plugin_type) {
|
std::string plugin_type_to_string(const PluginType& plugin_type) {
|
||||||
// We'll capitalize the acronyms because this is also our human readable
|
// We'll capitalize the acronyms because this is also our human readable
|
||||||
// format
|
// format
|
||||||
if (plugin_type == PluginType::vst2) {
|
if (plugin_type == PluginType::clap) {
|
||||||
|
return "CLAP";
|
||||||
|
} else if (plugin_type == PluginType::vst2) {
|
||||||
return "VST2";
|
return "VST2";
|
||||||
} else if (plugin_type == PluginType::vst3) {
|
} else if (plugin_type == PluginType::vst3) {
|
||||||
return "VST3";
|
return "VST3";
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ enum class LibArchitecture { dll_32, dll_64 };
|
|||||||
* `plugin_type_from_string()` with some invalid value we can use it to
|
* `plugin_type_from_string()` with some invalid value we can use it to
|
||||||
* gracefully show an error message without resorting to exceptions.
|
* gracefully show an error message without resorting to exceptions.
|
||||||
*/
|
*/
|
||||||
enum class PluginType { vst2, vst3, unknown };
|
enum class PluginType { clap, vst2, vst3, unknown };
|
||||||
|
|
||||||
template <typename S>
|
template <typename S>
|
||||||
void serialize(S& s, PluginType& plugin_type) {
|
void serialize(S& s, PluginType& plugin_type) {
|
||||||
|
|||||||
Reference in New Issue
Block a user