Add way to use 32-bit VST3 when both are installed

Otherwise we would always use the 64-bit version and there would be no
way to use the 32-bit version, if version for some reason works better.

Relates to #80.
This commit is contained in:
Robbert van der Helm
2021-04-13 19:27:02 +02:00
parent f177b69aae
commit a297866d45
7 changed files with 67 additions and 38 deletions
+15 -12
View File
@@ -59,12 +59,12 @@ class PluginBridge {
*/
template <typename F>
PluginBridge(PluginType plugin_type, F create_socket_instance)
: info(plugin_type),
// This is still correct for VST3 plugins because we can configure an
// entire directory (the module's bundle) at once
: config(load_config_for(get_this_file_location())),
info(plugin_type, config.vst3_prefer_32bit),
io_context(),
sockets(create_socket_instance(io_context, info)),
// This is still correct for VST3 plugins because we can configure an
// entire directory (the module's bundle) at once
config(load_config_for(info.native_library_path)),
generic_logger(Logger::create_from_environment(
create_logger_prefix(sockets.base_dir))),
plugin_host(
@@ -196,6 +196,9 @@ class PluginBridge {
if (config.vst3_no_scaling) {
other_options.push_back("vst3: no GUI scaling");
}
if (config.vst3_prefer_32bit) {
other_options.push_back("vst3: prefer 32-bit");
}
if (!other_options.empty()) {
init_msg << join_quoted_strings(other_options) << std::endl;
} else {
@@ -279,6 +282,14 @@ class PluginBridge {
#endif
}
/**
* The configuration for this instance of yabridge. Set based on the values
* from a `yabridge.toml`, if it exists.
*
* @see ../utils.h:load_config_for
*/
Configuration config;
/**
* Information about the plugin we're bridging.
*/
@@ -296,14 +307,6 @@ class PluginBridge {
*/
TSockets sockets;
/**
* The configuration for this instance of yabridge. Set based on the values
* from a `yabridge.toml`, if it exists.
*
* @see ../utils.h:load_config_for
*/
Configuration config;
/**
* The logging facility used for this instance of yabridge. See
* `Logger::create_from_env()` for how this is configured.