Robbert van der Helm
d5374e4540
💥 Rework Vst3MessageHandler
...
- Now allows direct deserialization into existing objects. This will be
necessary for our VST3 implementations since the interface instances
we'll deserialize into will not be trivially constructable because
they have to be able to do callbacks.
- `ControlResponse` and `CallbackResponse` were dropped. These response
enums are not necessary because of the `T::Response` associated type
and returning the types directly makes the direct deserialization
possible.
2020-12-07 18:28:16 +01:00
Robbert van der Helm
5423950a8a
Allow receiving VST3 messages into existing object
2020-12-07 18:28:16 +01:00
Robbert van der Helm
02dfe93ff0
Allow deserialization into an existing object
...
We're going to need this for VST3 because we're going to have to
explicitly instantiate our interface implementations since they need to
be able to perform complicated callbacks.
2020-12-07 18:28:16 +01:00
Robbert van der Helm
3be5836c07
Log and ignore unsupported interfaces
2020-12-07 18:28:16 +01:00
Robbert van der Helm
5f14958146
Implement IpluginFactory3::getClassInfoUnicode
2020-12-07 18:28:16 +01:00
Robbert van der Helm
ef3f82e00f
Implement IpluginFactory2::getClassInfo2
2020-12-07 18:28:16 +01:00
Robbert van der Helm
d8a4207748
Make the error messages more specific
...
In case this does ever come up.
2020-12-07 18:28:16 +01:00
Robbert van der Helm
049eb257c5
Make YaPluginFactory abstract
...
And add separate implementations for the native plugin and the Wine
plugin host. This way we can easily allow the native host to do
callbacks without having to manage a load of lambdas.
2020-12-07 18:28:16 +01:00
Robbert van der Helm
1db3c0371f
Expand on the VST3 implementation readme
2020-12-07 18:28:16 +01:00
Robbert van der Helm
dd48523183
Implement IPluginFactory::getClassInfo
2020-12-07 18:28:16 +01:00
Robbert van der Helm
e6da03ae84
Implement IPluginFactory::countClasses()
2020-12-07 18:28:16 +01:00
Robbert van der Helm
79df8fecc2
Serialize the factory info
2020-12-07 18:28:16 +01:00
Robbert van der Helm
fa10600114
Add more thoughts on how the factory should work
2020-12-07 18:28:16 +01:00
Robbert van der Helm
82c1542b74
Add boilerplate for copying factory interfaces
2020-12-07 18:28:16 +01:00
Robbert van der Helm
8f152c7af5
Clean up the query interface serialization
2020-12-07 18:28:16 +01:00
Robbert van der Helm
42f3639e93
Add boilerplate for PluginFactory serialization
2020-12-07 18:28:16 +01:00
Robbert van der Helm
930ebbf7d1
Add more todos for VST3 handling
2020-12-07 18:28:16 +01:00
Robbert van der Helm
27892d9e40
Get rid of debug prints in Vst3Bridge
2020-12-07 18:28:16 +01:00
Robbert van der Helm
a77e2fbfae
Add Bitsery serialization for FUIDs
2020-12-07 18:28:16 +01:00
Robbert van der Helm
76ad377522
Don't set __MINGW32__
...
This took me a few hours of non-stop headaches to figure out. Apparently
deep inside of Wine's headers having __MINGW32__ defined will cause some
GUIDs to be defined slightly differently. This normally wouldn't cause
issues, but when including `shellobj.h` or `objbase.h` this results in
multiple definition linking errors that are basically impossible to
diagnose.
2020-12-07 18:28:16 +01:00
Robbert van der Helm
d87afa99e0
Add logging for the VST3 plugin
2020-12-07 18:28:16 +01:00
Robbert van der Helm
426231a22b
Avoid potential UB in loggers using composition
...
This cast would work fine, but any other fields added to those loggers
would be left uninitialized.
2020-12-07 18:28:16 +01:00
Robbert van der Helm
c1e7f53cd0
💥 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`.
2020-12-07 18:28:16 +01:00
Robbert van der Helm
0819e9fda9
Request/send config for VST3 plugins
...
Using the new Vst3MessageHandler.
2020-12-07 18:28:16 +01:00
Robbert van der Helm
70405e8917
Encapsulate our VST3 message handling pattern
...
Similarly to how how we do it in `EventHandler`.
2020-12-07 18:28:16 +01:00
Robbert van der Helm
db1a51af5c
Add serialization primitives for VST3
2020-12-07 18:28:16 +01:00
Robbert van der Helm
2e9b100090
Add handlers for control messages and callbacks
2020-12-07 18:28:16 +01:00
Robbert van der Helm
e889ad22e2
Only pass Logger reference to AdHocSocketHandler
...
The boolean flag wasn't used, and it doesn't make any sense in the
context of VST3.
2020-12-07 18:28:16 +01:00
Robbert van der Helm
19eb33a7e2
Add a AdHocSocketHandler::receive_multi overload
...
With only a single callback.
2020-12-07 18:28:16 +01:00
Robbert van der Helm
ab7449a0e0
Add control sockets to Vst3Sockets
2020-12-07 18:28:16 +01:00
Robbert van der Helm
b9e63ea335
Move the host guard handler to PluginBridge
2020-12-07 18:28:16 +01:00
Robbert van der Helm
c2d2ac8fbf
Inherit Vst3PluginBridge init from PluginBridge
2020-12-07 18:28:16 +01:00
Robbert van der Helm
6b9ae78b27
Factor out all plumbing in Vst2PluginBridge
...
So we can reuse it in Vst3PluginBridge later.
2020-12-07 18:28:16 +01:00
Robbert van der Helm
f845763af0
Print the plugin type during initialisation
2020-12-07 18:28:16 +01:00
Robbert van der Helm
c57fd67aa8
Don't store the Wine version as a field
...
It's only needed for the initialisation message, and it doesn't throw so
doing this later shouldn't make a difference.
2020-12-07 18:28:16 +01:00
Robbert van der Helm
3c72ab31f8
Shut up clang/ccls
2020-12-07 18:28:16 +01:00
Robbert van der Helm
ff2807c939
Add all the boilerplate for the Vst3PluginBridge
...
And now that I also have an idea of what the communication model will
look like, this can server as a base for instantiating plugins.
2020-12-07 18:28:16 +01:00
Robbert van der Helm
6e5aa1c1c6
Add the Vst3Bridge boilerplate
2020-12-07 18:28:16 +01:00
Robbert van der Helm
6179fddbc8
Do some more testing and print some plugin info
2020-12-07 18:28:16 +01:00
Robbert van der Helm
ebc7802c08
Patch Win32 module loading to use Boost.Filesystem
...
C++17's `<filesystem>` header still doesn't seem to work with winegcc.
2020-12-07 18:28:16 +01:00
Robbert van der Helm
0b462c034e
Allow loading VST3 modules
...
Doesn't actually work yet or do anything, but it compiles and it runs.
2020-12-07 18:28:16 +01:00
Robbert van der Helm
9291ae7e42
Include the Win32 module loading implementation
2020-12-07 18:28:16 +01:00
Robbert van der Helm
715a95075b
Add required compiler args to the Wine VST3 dep
2020-12-07 18:28:16 +01:00
Robbert van der Helm
e273051a6c
Add a Vst3Bridge implementation file
2020-12-07 18:28:16 +01:00
Robbert van der Helm
84e13e556c
Add #ifdef WITH_VST3 guards around VST3 hosting
2020-12-07 18:28:16 +01:00
Robbert van der Helm
3db099e0fc
Also make the GroupHost plugin type agnostic
2020-12-07 18:28:16 +01:00
Robbert van der Helm
0eb80fe866
Add a general entry point to HostBridge
...
Since for all plugin types we would need to start listening for incoming
events this way.
2020-12-07 18:28:16 +01:00
Robbert van der Helm
3dd5090023
Support multiple plugin types in individual host
2020-12-07 18:28:16 +01:00
Robbert van der Helm
41da621e29
Add a todo for decoupling Editor from VST2
2020-12-07 18:28:16 +01:00
Robbert van der Helm
eeb6acf8dd
Move event handling to a common HostBridge
2020-12-07 18:28:16 +01:00