Robbert van der Helm
1088483f15
Mention destructors in VST3 implementation docs
2020-12-12 16:18:47 +01:00
Robbert van der Helm
68084bc555
Implement IComponent::terminate()
2020-12-12 16:18:47 +01:00
Robbert van der Helm
d80ba10f06
Interleave structs with their related functions
...
Might make it a bit more organized when this is fully implemented.
2020-12-12 16:04:35 +01:00
Robbert van der Helm
f5a90eb892
Fix typo in YaComponent destructor message
2020-12-12 14:59:59 +01:00
Robbert van der Helm
f526ae3e39
Add a string representation for universal tresult
2020-12-11 23:57:24 +01:00
Robbert van der Helm
e24cecc6d7
Use the univeral tresult in IComponent creation
2020-12-11 23:54:30 +01:00
Robbert van der Helm
91a47a466c
Create a universal wrapper around tvalue
2020-12-11 23:34:23 +01:00
Robbert van der Helm
699ddfd2ea
Implement YaComponentPluginImpl destructor
...
When the object gets dropped through the reference counting system, the
object should also be dropped in the Wine plugin host.
2020-12-11 22:59:32 +01:00
Robbert van der Helm
cdb9dae2df
Rename YaComponent::Arguments to CreateArgs
2020-12-11 22:43:12 +01:00
Robbert van der Helm
41b79720ca
Merge branch 'master' into feature/vst3
2020-12-11 00:50:43 +01:00
Robbert van der Helm
2615da51da
Fix the socket waiting fix #69
...
e07467697a changed the waiting behaviour,
but this meant that there was a very slight window where all secondary
requests would fail when both sides have called connect(), but the other
side has not already called `receive_{events,multi,messages}` to start
listening on the socket.
2020-12-11 00:33:28 +01:00
Robbert van der Helm
5c98b74bc2
Remove now unused variable
2020-12-10 15:07:16 +01:00
Robbert van der Helm
5f7c105b6d
Use boost::asio::transfer_exactly
...
Instead of doing assertions.
2020-12-10 15:03:26 +01:00
Robbert van der Helm
e07467697a
Only wait for sockets during initialization #69
2020-12-10 12:03:51 +01:00
Robbert van der Helm
4a056dcd31
Get rid of the VST3 logging boilerplate
2020-12-09 22:11:39 +01:00
Robbert van der Helm
225056bcff
Allow instantiating IComponents
2020-12-08 23:08:07 +01:00
Robbert van der Helm
2e6184171c
Use std::array for serializing UIDs
...
These are easily assignable and we have to convert between char
pointers, char arrays and UID objects all the time anyways.
2020-12-08 23:00:44 +01:00
Robbert van der Helm
7828fc7bef
Update the VST3 interface instantiation docs
2020-12-08 18:22:44 +01:00
Robbert van der Helm
5eb1fe2de2
Redesign how interface instantiation works
...
Transferring some argument pack is much easier than trying to
deserialize into an existing object when you also have to transfer more
information than just that object.
2020-12-08 17:33:51 +01:00
Robbert van der Helm
f4a5aa91fb
Document the plugin factory approach
2020-12-08 14:21:54 +01:00
Robbert van der Helm
ed743e6f22
Bundle associated messages with their interfaces
...
Once we start implementing all of the control messages/callbacks things
could quickly get out of hand otherwise.
2020-12-08 11:25:58 +01:00
Robbert van der Helm
5e85517130
Add the base for an IComponent implementation
2020-12-07 23:52:17 +01:00
Robbert van der Helm
e5cd777713
Fix the templated visitor in Vst3MessageHandler
...
Now it works as expected, since auto can't be initialized to multiple
different values.
2020-12-07 23:49:25 +01:00
Robbert van der Helm
d59a96b379
Move VST3 serializers to the structs
2020-12-07 22:33:41 +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
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
547b11e8ba
Remove interface filtering from the plugin factory
...
This doesn't work that way, and CIDs really are class IDs (good thing
that everything's documented, oh right).
2020-12-07 18:28:17 +01:00
Robbert van der Helm
e20fc8c7e6
Fix Vst{2,3}Logger::log_trace
2020-12-07 18:28:17 +01:00
Robbert van der Helm
8ea40cd9f9
Rework Vst3MessageHandler::receive_messages
...
This now takes a regular overloaded function and the visiting is done in
`receive_messages()` itself. This way we can use templates to ensure
that the return type is correct. Otherwise auto will cause issues in the
future when we want to return multiple concrete types from a function
that takes a single variant. The alternative would be both receiving a
variant as a parameter and then returning another variant as a result,
but that is much less type safe.
2020-12-07 18:28:16 +01:00
Robbert van der Helm
c2503f8aaa
Send the factory from the Wine host to the plugin
2020-12-07 18:28:16 +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
887a856e58
Rename Vst3MessageHandler::send_message overload
...
`receive_into()` looks much clearer in typical usage.
2020-12-07 18:28:16 +01:00
Robbert van der Helm
a16cf3015f
Fix deserializing into existing objects
...
`read_object()` was trying to create copies.
2020-12-07 18:28:16 +01:00
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
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
a77e2fbfae
Add Bitsery serialization for FUIDs
2020-12-07 18:28:16 +01:00