Allow hiding the DAW name for VST2 plugins

This can be useful when plugins have (broken) host-specific behaviour
that you want to avoid. I'll later add a list of host/plugin
combinations where this may be useful to the readme.
This commit is contained in:
Robbert van der Helm
2021-04-27 18:41:24 +02:00
parent 38abdbee50
commit 3a73fb9689
7 changed files with 93 additions and 11 deletions
+6
View File
@@ -119,6 +119,12 @@ Configuration::Configuration(const fs::path& config_path,
} else {
invalid_options.push_back(key);
}
} else if (key == "hide_daw") {
if (const auto parsed_value = value.as_boolean()) {
hide_daw = parsed_value->get();
} else {
invalid_options.push_back(key);
}
} else if (key == "vst3_no_scaling") {
if (const auto parsed_value = value.as_boolean()) {
vst3_no_scaling = parsed_value->get();
+10
View File
@@ -138,6 +138,15 @@ class Configuration {
*/
std::optional<float> frame_rate;
/**
* When this option is enabled, we'll report some random other string
* instead of the actual name of the host when the plugin queries it. This
* can sometimes be useful when a plugin has undesirable host-specific
* behaviour. See the readme for some examples of where this might be
* useful.
*/
bool hide_daw = false;
/**
* Disable `IPlugViewContentScaleSupport::setContentScaleFactor()`. Wine
* does not properly implement fractional DPI scaling, so without this
@@ -198,6 +207,7 @@ class Configuration {
s.value1b(editor_xembed);
s.ext(frame_rate, bitsery::ext::StdOptional(),
[](S& s, auto& v) { s.value4b(v); });
s.value1b(hide_daw);
s.value1b(vst3_no_scaling);
s.value1b(vst3_prefer_32bit);
+14
View File
@@ -31,6 +31,20 @@
*/
constexpr time_t audio_thread_priority_synchronization_interval = 10;
/**
* When the `hide_daw` compatibility option is enabled, we'll report this
* instead of the actual DAW's name. This can be useful when plugins are
* hardcoded to behave differently in certain DAWs, and when that different
* behaviour causes issues under Wine. Examples of this are Melodyne 5 under
* REAPER, and AAS Chromaphone 3 under Bitwig.
*/
constexpr char product_name_override[] = "Get yabridge'd";
/**
* When the `hide_daw` compatibility option is enabled, we'll report this
* instead of the actual vendor's name in a VST2 plugin.
*/
constexpr char vendor_name_override[] = "yabridge";
// The cannonical overloading template for `std::visitor`, not sure why this
// isn't part of the standard library
template <class... Ts>