Add a CLAP plugin type

These aren't handled anywhere yet
This commit is contained in:
Robbert van der Helm
2022-08-24 14:55:57 +02:00
parent 54c506c703
commit 09e6c6494e
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -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";
+1 -1
View File
@@ -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) {