Commit Graph

24 Commits

Author SHA1 Message Date
Robbert van der Helm 2bf41c6fe1 Move EventPayload to Vst2Event::Payload 2021-05-20 15:52:40 +02:00
Robbert van der Helm b1c9d75112 Rename the Event struct to Vst2Event 2021-05-20 15:50:09 +02:00
Robbert van der Helm 3e6bf3adfd Allow overriding sending behaviour for VST2 events
Now we can implement mutual recursion for VST2 plugins. Wish we didn't
have to.
2021-05-20 14:49:11 +02:00
Robbert van der Helm ccfda51a69 Clarify the DefaultDataConverter method names 2021-05-20 14:49:11 +02:00
Robbert van der Helm 06bae784a8 Update documentation in passthrough_event()
There were some glaring typos in there. I probably replaced them with
new ones.
2021-05-20 14:31:59 +02:00
Robbert van der Helm c2186fa55b Use the std::derived_from concept when applicable
This probably makes things much clearer at a glance instead of using a
blanked typename.
2021-05-20 14:31:59 +02:00
Robbert van der Helm a194765696 Rename EventHandler to Vst2EventHandler 2021-05-20 13:54:31 +02:00
Robbert van der Helm e4ca520b64 💥 Redo all higher order template functions
This does what we did for a few functions in the last few commits for
every function. We now use either the `std::invocable` concept or our
own `invocable_returning` concept wherever possible to make sure we pass
function types to these template functions, since constraint errors are
a lot more readable than template deduction errors. And instead of
having to specify the return type as a template argument, we now just
use `std::invoke_result_t<F>` instead. The VST3 message handling
functions are still using the good old `typename F` since those are
overloaded polymorphic functions. This was also a good moment to modify
`AdHocSocketHandler::send()` to allow functions returning void (this got
rid of an old fixme where we had to return some dummy value from a
function instead of just not returning anything).
2021-05-20 01:03:58 +02:00
Robbert van der Helm 59ba2aeb5f Add noexcept qualifications in src/common
Apparently this can actually make a difference in some cases, and the
C++ Core Guideliens recommend doing this on all default constructors,
destructors, and all functions that can not throw (and thus also don't
allocate).
2021-05-14 17:12:24 +02:00
Robbert van der Helm 671587f981 Further reduce allocations by reusing responses
On the plugin's side, still need to do a lot of work on the Wine side of
things.
2021-05-07 17:00:43 +02:00
Robbert van der Helm 34f8d3b1d2 Update the copyright notices for 2021 2021-01-01 18:54:02 +01:00
Robbert van der Helm 33806139e9 Revert "Allow disabling ad-hoc socket spawning"
It turns out we can't safely disable this, because in some situations we
still have these mutually recursive function calls. We could optimize
this a bit to have those calls be handled by the general sockets, but
this is much more manageable.

This reverts commit 415c1b5683.
2020-12-29 00:25:44 +01:00
Robbert van der Helm 415c1b5683 Allow disabling ad-hoc socket spawning
We'll need this for handling `IAudioProcessor` method calls in VST3. We
basically want a `Vst3MessageHandler` per `IAudioProcessor` instance,
but without the additional socket spawning or extra thread.
2020-12-21 15:45:47 +01:00
Robbert van der Helm 32c1028736 Implement IPluginFactory3::setHostContext()
Now the plugin factories are fully implemented (at least, functionality
wise, we still can't create most kinds of objects).
2020-12-13 15:53:39 +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 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 f9a1bcd7bd Split VST2 specific functionality into Vst2Logger 2020-12-07 18:28:16 +01:00
Robbert van der Helm 2230b5099f Move logger to common/logging/common.h 2020-12-07 18:28:16 +01:00
Robbert van der Helm 687696ec6b Reimplement EventHandler on top of AdHocSocketHandler 2020-12-07 18:28:16 +01:00
Robbert van der Helm 555b442f75 Add a todo regarding benchmarking ad hoc sockets 2020-12-07 18:28:16 +01:00
Robbert van der Helm fa719c286d Create base class for sockets and derive from that
Now the host launching procedure can be agnostic of the socket
implementation.
2020-12-07 18:28:16 +01:00
Robbert van der Helm bb85d99657 Rename 'Sockets' to 'Vst2Sockets' 2020-12-07 18:28:16 +01:00
Robbert van der Helm 2fbd14908a Split communication/vst2.h into common and VST2
So we can reuse the generic bits for our VST3 implementation.
2020-12-07 18:28:16 +01:00
Robbert van der Helm 46bc0301af Move communication.h to communication/vst2.h 2020-12-07 18:28:16 +01:00