Robbert van der Helm
9cea175f2a
Globally ignore attribute warnings on Wine side
...
These started happening after Wine 5.12, and it doesn't look like it's
going to change.
2022-09-11 19:18:03 +02:00
Robbert van der Helm
1fec4c8860
Change the description in the GPL header
2022-04-16 20:37:10 +02:00
Robbert van der Helm
88ac466501
Remove all references to Boost
...
Since we no longer depend on any of it.
2022-04-16 20:37:10 +02:00
Robbert van der Helm
b2a15620f3
Swap Boost.Container's small_vector out for LLVM's
...
This implementation misses a shrink to fit function, but reassigning the
vector with a fresh one should be equivalent.
2022-04-16 20:37:10 +02:00
Robbert van der Helm
556b0e38f9
Replace Boost.Asio with standalone Asio library
...
We had to add an even hackier hack now to get Boost.Process to
interoperate with Asio's IO contexts. This will be replaced later when
we replace Boost.Process.
2022-04-14 23:42:12 +02:00
Robbert van der Helm
0b9a16cf40
Change the naming scheme for class field members
...
I'm not a fan of Hungarian notation, but C++ kind of needs it with its
implicit `this`. And of all the common options for this, I find
suffixing members with an underscore the least offensive one.
2022-01-01 21:07:17 +01:00
Robbert van der Helm
e0ab24e645
Update copyright headers
...
Happy new year!
2022-01-01 18:32:10 +01:00
Robbert van der Helm
c98a9519fe
Handle X11 events within the Win32 event loop
...
This unifies event handling and it allows X11 events to still be
processed even when the event loop is blocked.
2021-07-31 15:19:44 +02:00
Robbert van der Helm
67e754feb5
Make the maximum block size in VST2 optional
2021-06-12 20:05:39 +02:00
Robbert van der Helm
50c25c1cf0
💥 Reimplement VST2 audio processing
...
We now use shared memory to store the input and output audio buffers.
This means that we have to copy less data every processing cycle, since
a single copy to and a single copy from the shared memory object
suffices now. This should reduce the DSP load for VST2
plugins (especially when used in a plugin group) marginally to
significantly depending on the plugins used and the system
configuration.
2021-06-10 17:31:32 +02:00
Robbert van der Helm
53d59f74d1
Reduce the VST2 events small vector capacities
...
Every DAW will just send all events in one go (and I think that's the
only way you should do it, but the VST2 spec is a bit leaky so who
knows). It wouldn't make much sense to preallocate more capacity,
because when DAWs do send all of those events individually they might
end up sending more than four of these anyways.
2021-06-10 12:43:54 +02:00
Robbert van der Helm
29e0a0fd36
Reuse VST2 audio processing buffers on Wine side
...
Just like we made similar changes on the plugin side a few commits ago
to prevent allocations there.
2021-05-23 16:37:01 +02:00
Robbert van der Helm
e700678a11
Also preallocate small buffers for VST2 events
2021-05-23 00:10:03 +02:00
Robbert van der Helm
a96cfc8090
Allow mutual recursion between audioMasterUpdateDisplay and effGetProgram
...
This prevents Voxengo VST2 plugins from freezing in Renoise when
recalling their state. See the comments in the diff for why this is
necessary.
2021-05-20 15:28:00 +02:00
Robbert van der Helm
a9643577fd
Also add noexcept qualifications on the Wine side
...
See the last few commits.
2021-05-14 18:27:19 +02:00
Robbert van der Helm
af299f3c66
Always define NOMINMAX and friends globally
...
Repeating this every time is worse than defining them in the compiler
command line.
2021-05-11 02:27:43 +02:00
Robbert van der Helm
5577c4bfd8
Fix build on Wine 6.8 #103
...
Wine dropped `WINE_NOWINSOCK`, so now we sadly have to define this
globally instead.
2021-05-11 02:27:38 +02:00
Robbert van der Helm
832089d4d1
Implement the Wine host process watchdog
...
This will shut down a bridge's sockets when the connected native host
process exits, to prevent dangling Wine processes.
2021-05-01 17:54:22 +02:00
Robbert van der Helm
d8ca4022d1
Add universal way to shutdown sockets on Wine side
2021-05-01 16:51:55 +02:00
Robbert van der Helm
b22f207aee
Move the MainContext to HostBridge
...
We'll use this to create a watchdog timer that shuts down the sockets
when the native host gets terminated.
2021-05-01 15:06:13 +02:00
Robbert van der Helm
6f6e6c5b94
Reword caching to prefetching
...
Since that makes it much clearer what we're actually doing. With old
`cache_time_info` was actually caching the response, but now we're
querying it before the plugin has even requested the information.
2021-04-29 01:07:14 +02:00
Robbert van der Helm
c82eb35243
Also cache audioMasterGetCurrentProcessLevel()
...
Melda plugins seem to call this during every processing cycle.
2021-04-29 01:02:10 +02:00
Robbert van der Helm
1deb4cf664
Send the VST2 transport info along with processing
...
And cache it during the processing cycle. This greatly reduces the
overhead of bridging VST2 plugins.
2021-04-29 00:32:25 +02:00
Robbert van der Helm
6cd1b664d3
Rearrange fields in Vst2Bridge
2021-04-29 00:31:11 +02:00
Robbert van der Helm
70adf5493e
Add a logger to the Wine VST2 bridge
2021-04-29 00:31:11 +02:00
Robbert van der Helm
d55f07e962
Fix a small typo
2021-04-25 21:46:55 +02:00
Robbert van der Helm
afefb725b5
Postpone clearing old MIDI events until next event
...
This fixes Native Instrument's FM7 crashing on MIDI input. The plugin
expects the last received MIDI event to always be alive during audio
processing, even if there have not been any new events in this
processing cycle.
2021-04-23 01:08:21 +02:00
Robbert van der Helm
3fbffa532d
Move Win32 event handling to one place
...
Or technically, two, since the group bridge also does the same loop. We
no longer need special handling for VST2 and VST3 plugins, so we can
simplify things a bit here.
2021-02-09 23:45:33 +01:00
Robbert van der Helm
0adca3e33c
Revert "Remove cache_time_info and always cache time info"
...
This reverts commit cfb171c991 .
No idea why, but this cache breaks SPL Transient Designer Plus. Perhaps
it overwrites the time info?
2021-01-30 02:37:27 +01:00
Robbert van der Helm
cfb171c991
Remove cache_time_info and always cache time info
...
It sort of goes against yabridge's principles to not do these
unnecessary `audioMasterGetTime()` calls if the plugin does that, but it
also hurts the user experience to not have this as a default.
2021-01-30 00:20:35 +01:00
Robbert van der Helm
72e29d044a
Add a function for temporarily blocking event loop
...
This can be used to prevent the Win32 message loop from running while
there are plugins in some partially initialized state.
2021-01-27 19:00:11 +01:00
Robbert van der Helm
34f8d3b1d2
Update the copyright notices for 2021
2021-01-01 18:54:02 +01:00
Robbert van der Helm
6b4df4d274
Explicitly include <mutex>
...
This is an indirect dependency in Boost 1.72/1.73, but not in older
versions.
2020-12-25 21:55:00 +01:00
Robbert van der Helm
a724b378fe
Move the editor handling back to Vst2Bridge
...
Since we can have multiple editors in Vst3Bridge.
2020-12-19 19:56:49 +01:00
Robbert van der Helm
d485aa296a
Fix VST2-only builds
2020-12-07 18:28:17 +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
0819e9fda9
Request/send config for VST3 plugins
...
Using the new Vst3MessageHandler.
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
715a95075b
Add required compiler args to the Wine VST3 dep
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
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
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
46bc0301af
Move communication.h to communication/vst2.h
2020-12-07 18:28:16 +01:00