Commit Graph

274 Commits

Author SHA1 Message Date
Robbert van der Helm 2e9b100090 Add handlers for control messages and callbacks 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
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 278cd2e710 Spawn all hosts directly using HostRequest
This way we can set the plugin type inside of the `Vst*PluginBridge`
instance.
2020-12-07 18:28:16 +01:00
Robbert van der Helm e21d3e020f Rename GroupRequest to HostRequest
We'll also use this to encode information in when launching
`yabridge-host.exe` for individually hosted plugins.
2020-12-07 18:28:16 +01:00
Robbert van der Helm 1c5a9423d2 Print the plugin type on initialization 2020-12-07 18:28:16 +01:00
Robbert van der Helm f9bb3822de Pass plugin type when calling the host application 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
Robbert van der Helm 9d40e04a62 Update all references to libyabridge.so 2020-12-07 18:28:16 +01:00
Robbert van der Helm 23d5567e72 Add a time info caching compatibility option #62
This is needed to get good performance out of SWAM Cello until this
issue is fixed by the plugin.
2020-11-30 14:49:02 +01:00
Robbert van der Helm e08162fabf Silence warnings on decltype() with Wine 5.22
There were already similar warnings on 32-bit winegcc, but now it also
happens on the 64-bit version. Instead of adding
`-Wno-ignored-attributes` we'll just sprinkle some warning ignores here
and there to prevent any other surprises.
2020-11-30 14:05:48 +01:00
Robbert van der Helm cbf276b7dc Hide all symbols by default
As mentioned by @abique. Could prevent issues caused by symbol clashes,
and it also greatly reduces the size of all binaries.
2020-11-27 20:40:59 +01:00
Robbert van der Helm 49900e4753 Fix typo 2020-11-20 17:45:21 +01:00
Robbert van der Helm 28013cb6a7 Note that the effEditIdle issue is fixed in Ardour
For the upcoming Ardour 6.4 release:

https://github.com/Ardour/ardour/commit/f7cb1b0b481eeda755bdf8eb9fc5f90a81d2aa01
2020-11-20 15:59:40 +01:00
Robbert van der Helm abb2206970 Fix typos in the word 'Boost'
Apparently I type very quickly.
2020-11-20 01:15:51 +01:00
Robbert van der Helm ff021d0581 Work around editor opening bug in Ardour 6.3 2020-11-13 17:08:41 +01:00
Robbert van der Helm 09ba0d887b Remove old TODO
MainContext is now basically just a wrapper with a simple event loop
implementation so it's not really necessary, but having a separate type
for the 'main' IO context still makes everything much clearer.
2020-11-10 15:52:35 +01:00
Robbert van der Helm b04e1da0d9 Terminate the Wine host after the sockets close
The Wine host application would not close properly if the VST host would
suddenly crash or terminate without closing all plugins.
2020-11-08 21:49:52 +01:00
Robbert van der Helm 9300648067 Fix typo in vst2.cpp 2020-11-08 16:07:57 +01:00
Robbert van der Helm d2500ff31d Get rid of message loop skipping and EditorOpening
This special behaviour is no longer needed now that event handling is
fully concurrent and the Win32 message loop no longer blocks
`dispatch()` calls.
2020-11-07 22:06:58 +01:00
Robbert van der Helm a0c0a86e2c Drop the separate effProcessEvents socket
Now that event handling is fully concurrent and thus no longer gets
blocked by the Win32 message loop.
2020-11-07 20:54:33 +01:00
Robbert van der Helm 23cd2dd193 Bump the event loop handling rate up to 60 Hz
This will also cause plugins to update their editors at 60 FPS. This was
kept at a lower value for performance reasons, but since the message
loop now no longer blocks event handling we can safely increase this.
This will double the amount of resources spent on drawing, but since
audio processing in a real world scenario almost never utilizes all
cores anyways this should not be an issue.
2020-11-07 00:30:12 +01:00
Robbert van der Helm 36f6e93216 No longer track whether the GUI is active
This ended up being unnecessary.
2020-11-06 17:54:42 +01:00
Robbert van der Helm 1c7e866609 No longer return a lambda in passthrough_event()
Now that it's no longer used directly this is no longer needed, and it's
much clearer without the lambda.
2020-11-06 17:17:36 +01:00
Robbert van der Helm ba6381e3ae Rename EventHandler::{send,receive} to *_event(s?)
Since it does something way more involved than
`SocketHandler::{send,receive_multi}`, and that makes it a bit confusing
if you don't already know about that (and even if you do).
2020-11-01 12:01:50 +01:00
Robbert van der Helm fa01ac843b Replace all non-group sockets with SocketHandler
This greatly reduces the amount of boilerplate and potential for error.
2020-10-30 13:30:08 +01:00
Robbert van der Helm 08cd7cf8ab Join Win32Threads on destruct, like std::jthread 2020-10-28 21:11:34 +01:00
Robbert van der Helm dd9957159a Move the sockets after the threads in Vst2Bridge
This way the sockets can be destroyed before the threads, and we can
safely wait for the threads to shut down. I initially had Win32Thread
imitate std::jthread's join-on-destruct, but that was causing group
processes to hang. Now we can safely add that back again, and this will
fix some spurious segfaults during plugin scans when using plugin groups
containing a massive amount of plugins.
2020-10-28 21:05:14 +01:00
Robbert van der Helm d81759c929 Add an explicit wait to our thread wrapper 2020-10-28 20:40:19 +01:00
Robbert van der Helm bece654c2d Rename PluginContext to MainContext for clarity 2020-10-28 01:02:56 +01:00
Robbert van der Helm fac820c25a Execute all non-unsafe opcodes on calling thread
This will require more testing of course, but I think it should be safe.
This would increase the potential maximal throughput in group hosts
significantly.
2020-10-27 23:18:59 +01:00
Robbert van der Helm eb8d4ae1d8 Fix Win32Thread not capturing by move
std::function does not allow non-movable lambdas, so capturing by move
doesn't work there. And the old solution of course has issues with
dangling pointers (but because this is C++ the compiler still thinks
it's A-Ok).
2020-10-27 22:53:59 +01:00
Robbert van der Helm 28886e7073 Replace all threads with Win32Thread in Wine host 2020-10-27 18:29:38 +01:00
Robbert van der Helm bafc36614b Properly forward arguments in Win32Thread 2020-10-27 18:28:23 +01:00