💥 Major refactor of initialization plumbing

To account for the differences in VST2 plugins and VST3 modules we had
to wrap most of our old functions from `src/plugin/utils.h` in a new
`PluginInfo` struct that gathers all of this information while taking
into account the differences between VST2 and VST3 plugins.

With this change things are also a lot more organized. We can just query
the plugin information we need rather than having to store things
separately or having to recalculate things. This also moved the
responsibility of all the weird `WINEPREFIX` behaviour to a single place
instead of having it spread around `utils.pp`, the initialisation
message, and `host-procoess.cpp`.
This commit is contained in:
Robbert van der Helm
2020-12-04 18:13:52 +01:00
parent 0819e9fda9
commit c1e7f53cd0
11 changed files with 464 additions and 261 deletions
-9
View File
@@ -41,15 +41,6 @@ static_assert(std::is_same_v<intptr_t, int64_t>);
using native_size_t = uint64_t;
using native_intptr_t = int64_t;
// The cannonical overloading template for `std::visitor`, not sure why this
// isn't part of the standard library
template <class... Ts>
struct overload : Ts... {
using Ts::operator()...;
};
template <class... Ts>
overload(Ts...) -> overload<Ts...>;
/**
* An object containing the startup options for hosting a plugin. These options
* are passed to `yabridge-host.exe` as command line arguments, and they are
+1
View File
@@ -24,6 +24,7 @@
#include <bitsery/traits/vector.h>
#include <vestige/aeffectx.h>
#include "../utils.h"
#include "../vst24.h"
#include "common.h"
+1
View File
@@ -21,6 +21,7 @@
#include <bitsery/ext/std_variant.h>
#include "../configuration.h"
#include "../utils.h"
#include "common.h"
// Event handling for our VST3 plugins works slightly different from how we