Add an XEmbed compatibility option

This commit is contained in:
Robbert van der Helm
2020-12-25 18:11:55 +01:00
parent 7da5ec113c
commit 49eeee99fa
5 changed files with 29 additions and 2 deletions
+7 -2
View File
@@ -12,8 +12,13 @@ Versioning](https://semver.org/spec/v2.0.0.html).
TODO: Add the relevant entries here for yabridge's VST3 support
- Added the `with-vst3` option to control whether yabridge should be built with
VST3 support. This is enabled by default.
- Added the `with-vst3` compile time option to control whether yabridge should
be built with VST3 support. This is enabled by default.
- Added an
[option](https://github.com/robbert-vdh/yabridge#compatibility-options) to use
XEmbed instead of yabridge's normal window embedding method. Some plugins have
redrawing issues when using XEmbed and editor resizing won't work, so it's not
recommended to use it as a default.
### Changed
+4
View File
@@ -282,6 +282,7 @@ other. See below for an [example](#example) of how these groups can be set up.
| --------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cache_time_info` | `{true,false}` | Compatibility option for plugins that call `audioMasterGetTime()` multiple times during a single processing cycle. With this option subsequent calls during a single audio processing cycle will reuse the value returned by the first call to this function. This is a bug in the plugin, and this option serves as a temporary workaround until the plugin fixes the issue. |
| `editor_double_embed` | `{true,false}` | Compatibility option for plugins that rely on the absolute screen coordinates of the window they're embedded in. Since the Wine window gets embedded inside of a window provided by your DAW, these coordinates won't match up and the plugin would end up drawing in the wrong location without this option. Currently the only known plugins that require this option are _PSPaudioware_ plugins with expandable GUIs, such as E27. Defaults to `false`. |
| `editor_xembed` | `{true,false}` | Use Wine's XEmbed implementation instead of yabridge's normal window embedding method. Some plugins will have redrawing issues when using XEmbed and editor resizing won't work properly with it, but it could be useful in certain setups. Defaults to `false`. |
These options are workarounds for issues mentioned in the [known
issues](#runtime-dependencies-and-known-issues) section. Depending on the hosts
@@ -315,6 +316,9 @@ group = "toneboosters"
["PSPaudioware"]
editor_double_embed = true
["Analog Lab 3.so"]
editor_xembed = true
["SWAM Cello 64bit.so"]
cache_time_info = true
+6
View File
@@ -90,6 +90,12 @@ Configuration::Configuration(const fs::path& config_path,
} else {
invalid_options.push_back(key);
}
} else if (key == "editor_xembed") {
if (const auto parsed_value = value.as_boolean()) {
editor_xembed = parsed_value->get();
} else {
invalid_options.push_back(key);
}
} else if (key == "group") {
if (const auto parsed_value = value.as_string()) {
group = parsed_value->get();
+9
View File
@@ -101,6 +101,14 @@ class Configuration {
*/
bool editor_double_embed = false;
/**
* Use XEmbed instead of yabridge's normal editor embedding method. Wine's
* XEmbed support is not very polished yet and tends to lead to rendering
* issues, so this is disabled by default. Also, editor resizing won't work
* reliably when XEmbed is enabled.
*/
bool editor_xembed = false;
/**
* The name of the plugin group that should be used for the plugin this
* configuration object was created for. If not set, then the plugin should
@@ -135,6 +143,7 @@ class Configuration {
void serialize(S& s) {
s.value1b(cache_time_info);
s.value1b(editor_double_embed);
s.value1b(editor_xembed);
s.ext(group, bitsery::ext::StdOptional(),
[](S& s, auto& v) { s.text1b(v, 4096); });
s.ext(matched_file, bitsery::ext::StdOptional(),
+3
View File
@@ -160,6 +160,9 @@ class PluginBridge {
if (config.editor_double_embed) {
other_options.push_back("editor: double embed");
}
if (config.editor_xembed) {
other_options.push_back("editor: XEmbed");
}
if (!other_options.empty()) {
init_msg << join_quoted_strings(other_options) << std::endl;
} else {