Robbert van der Helm
51877796fa
Add dedicated IAudioProcessor/IComponent sockets
...
This way every relevant object instance will get its own thread for
handling these calls. The alternative would be creating a full fat
Vst3MessageHandler pair for all object instances, but that would be a
huge waste.
2020-12-21 17:26:30 +01:00
Robbert van der Helm
63ae5f330c
Don't cache IHostApplication::getName()
...
As it turns out there are only two or three functions where we can do
this. It also breaks logging, and this function will probably only be
called once anyways. More consistency is always better.
2020-12-19 18:28:16 +01:00
Robbert van der Helm
d0e96da21a
Rename register_component to register_plugin_proxy
2020-12-17 13:33:34 +01:00
Robbert van der Helm
11bf7532fa
Rename the monolitic class to Vst3PluginProxy
...
Now it's starting to look promising.
2020-12-17 13:07:42 +01:00
Robbert van der Helm
d8b2646563
Split off IComponent and create a monolithic class
...
We can now use implement all VST3 plugin interfaces through this class,
check whether the object from the plugin also supports these classes,
and then conditionally allow casting to the supported classes. This
should give us a one-to-one proxy of the original object.
2020-12-17 12:49:33 +01:00
Robbert van der Helm
6d0a38f720
Null initialize the plugin factory pointer
2020-12-16 18:55:34 +01:00
Robbert van der Helm
62f376d952
Allow the module to be properly unloaded
...
Terminating the host process will cause all sockets to be closed so we
can join the threads.
2020-12-14 22:49:20 +01:00
Robbert van der Helm
1b30000147
Keep track of active YaComponentPluginImpls
...
So we can do host callbacks later.
2020-12-12 21:24:11 +01:00
Robbert van der Helm
92ea15bcb4
Allow interface implementations to send messages
2020-12-08 23:01:50 +01:00
Robbert van der Helm
f1fe0fa8a4
Log a warning when encountering unknown interfaces
2020-12-07 22:21:01 +01:00
Robbert van der Helm
7b3a6af7d1
Use raw pointers for the plugin factory
...
Since the object cleans up after itself after the smart pointers are
dropped on the host side this would result in a use after free by the
smart pointers.
2020-12-07 18:28:17 +01:00
Robbert van der Helm
d79bc3b936
Don't use STL smart pointers with VST3 interfaces
...
This would cause double frees since those objects are supposed to clean
up after themselves.
2020-12-07 18:28:17 +01:00
Robbert van der Helm
75e8cf9140
Add notes on things that can potentially go wrong
2020-12-07 18:28:17 +01:00
Robbert van der Helm
9954282065
Add manual reference counting to GetPluginFactory
...
Since even though we're passign raw pointers, it's expected that they
are actually `IPtr<T>`s.
2020-12-07 18:28:17 +01:00
Robbert van der Helm
79c6f02d91
Request and deserialize plugin factory from plugin
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
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
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