Commit Graph

515 Commits

Author SHA1 Message Date
Robbert van der Helm d2fb84e529 Add CLAP plugin destroying
Everything else is still a stub, but at least the lifecycle now works
correctly.
2022-09-11 19:18:03 +02:00
Robbert van der Helm a9bb60772d Add functions for registering CLAP plugin proxies 2022-09-11 19:18:03 +02:00
Robbert van der Helm a1f73692cc Start CLAP audio thread socket
This doesn't do anything yet, but otherwise creating the plugin instance
stalls. And it's safer to add a dummy listener here for the time being
than to remove the latch and risk forgetting to add it back later.
2022-09-11 19:18:03 +02:00
Robbert van der Helm 7575fb7af3 Ensure CLAP_ABI is set
This will avoid some potential issues when people try to build this
against old CLAP headers.
2022-09-11 19:18:03 +02:00
Robbert van der Helm 423534f373 Implement Wine side for creating plugin instances 2022-09-11 19:18:03 +02:00
Robbert van der Helm 8c5fb448de Add stubs for a CLAP host proxy implementation 2022-09-11 19:18:03 +02:00
Robbert van der Helm 64bc31d819 Work around spurious GCC warning w/ string concat 2022-09-11 19:18:03 +02:00
Robbert van der Helm 49e3f7ff1e Capitalize CLAP plugin descriptor class name
To stay consistent with the rest of the naming.
2022-09-11 19:18:03 +02:00
Robbert van der Helm 1339c20fc1 Implement the Wine side of listing plugins 2022-09-11 19:18:03 +02:00
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 e1efe52cfd Silence new ignored attributes warning 2022-09-11 19:18:03 +02:00
Robbert van der Helm d7266a1bc3 Bail when initializing CLAP entry point fails 2022-09-11 19:18:03 +02:00
Robbert van der Helm 1274edf649 Bail when loading incompatible CLAP plugins
Based on the version.
2022-09-11 19:18:03 +02:00
Robbert van der Helm e531334bde Initialize the CLAP entry point 2022-09-11 19:18:03 +02:00
Robbert van der Helm ec8028f78c Allow serializing CLAP plugin factory list message 2022-09-11 19:18:03 +02:00
Robbert van der Helm f595a48fbd Enable CLAP support for plugin groups 2022-09-11 19:18:03 +02:00
Robbert van der Helm bfe3cab8d2 Add boilerplate for a CLAP bridge 2022-09-11 19:18:03 +02:00
Robbert van der Helm 7a60cf37ea Fix typos 2022-09-11 19:18:03 +02:00
Robbert van der Helm 6df0741195 Prefix top level VST3 message types
CLAP will use a similar structure. Alternatively we could use
namespaces, but while that would solve clashes for the linker with the
way namespaces in C++ work it would still be ambiguous which one is
being referred to just looking at the code.
2022-09-11 19:18:03 +02:00
Robbert van der Helm 4ca7ea17b2 Change terminology from 'VST' to 'plugin' 2022-09-11 19:18:03 +02:00
Robbert van der Helm 687bee34d5 Silence spurious maybe uninitialized warning 2022-06-14 14:47:07 +02:00
Robbert van der Helm 49526b1e7d Handle effGetProgramNameIndexed as mutually recursive
This fixes changing presets in Full Bucket's Ragnarök.
2022-06-14 14:40:17 +02:00
Robbert van der Helm 61b141a0fe Inhibit event loop after IPluginBase::terminate()
This 'fixes' recent Arturia VST3 plugins crashing at the end of a plugin
scan in REAPER.
2022-06-11 22:53:13 +02:00
Robbert van der Helm d9de22ddbd Add support for VST2 effBeginLoad{Bank,Program}
A user reported that REAPER was using these on the REAPER forum, but I
have not been able to reproduce that. And they went MIA after posting
about it. But hopefully this helps.
2022-06-08 14:27:04 +02:00
Robbert van der Helm 162aeed661 Only set up VST3 SHM audio buffers in setActive()
This avoids doing the duplicate check (since both `setProcessing()` and
`setActive()` would be called), and this also gets rid of the assumption
added a couple commits ago that `setupProcessing()` is only ever called
once, which is not true.
2022-05-19 14:43:59 +02:00
Robbert van der Helm 8c10edf861 Add explicit virtual default destructors
We need to silence the warning about this because Steinberg doesn't
declare their base class destructors as virtual (because of Windows ABI
compatibility issues). But we can still do it inside of yabridge to have
at least a bit more safety.
2022-05-18 18:44:15 +02:00
Robbert van der Helm 3e73d60b78 Only resize VST3 shared memory buffers when needed
This is an optimization for the last commit (split into two for
readability's sake).
2022-05-18 18:16:14 +02:00
Robbert van der Helm dedcdefebf Allow resizing shared memory buffers in setActive
REAPER apparently changes bus arrangements between
`IAudioProcessor::setupProcessing()` and `IAudioProcessor::setActive()`.
2022-05-18 18:16:14 +02:00
Robbert van der Helm 5d9029d839 Store process setup data instead of offline flag
This is needed later when potentially reallocating the shared memory
during setActive().
2022-05-18 17:40:19 +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 037d6ad5aa Replace Boost.Process for the Wine plugin host
Now we use our own library for this, so we can drop the Boost.Filesystem
dependency after a couple more changes.
2022-04-16 20:37:10 +02:00
Robbert van der Helm 75b3cf266d Add Process functions for detached spawning 2022-04-16 20:37:10 +02:00
Robbert van der Helm 60e4619ef1 Move pid_running() to process.h 2022-04-14 23:42:12 +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 d2d4cf4ea9 Replace most uses of Boost.{Filesystem,Process}
With the `ghc::filesystem` dependency from the previous commit. If we
can replace the rest of the Boost.Filesystem dependency then we can get
rid the one nasty runtime dependency we have, and it will make
implementing the chainloading simpler since can reuse more code without
bringing in Boost.
2022-04-14 23:42:12 +02:00
Robbert van der Helm f298a8ae2b Delay VST2 editor window sizing
To work around a buggy plugin.
2022-02-27 00:59:50 +01:00
Robbert van der Helm 1b8248d672 Process offline audio from the GUI thread
Because T-RackS 5 won't have it any other way.
2022-01-19 18:18:20 +01:00
Robbert van der Helm 4767b758b8 Delay showing editor the window
This fixes Waves V13 VST3 plugins crashing when opening the editor. They
will likely still crash later on anyways because they're kinda broken.
Amazing.
2022-01-09 00:41:14 +01:00
Robbert van der Helm c625deadef Proxy host context menu items for VST3 plugins
This wasn't implemented yet because no plugin tried using the interface
in this way before this, but Surge XT incorporates the host's context
menu items into their own (much more elaborate) context menu. To
accommodate this, we now copy over all of the host's prepopulated
context menu items to the Wine plugin host, and calling the targets
associated with any of those items will cause the target on the
associated context menu item on the host to be called.

This is slightly more complicated than what would otherwise be necessary
because Bitwig does not assign tags to their context menu items and
instead always uses 0.
2022-01-03 17:04:00 +01: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 dad3645156 Add a todo about backing rwlocks with a spinlock 2021-12-29 15:44:32 +01:00
Robbert van der Helm 1507e4f574 Use multiple reader single writer locks for VST3
This would also need to be done on the plugin side.
2021-12-28 18:51:14 +01:00
Robbert van der Helm 2137d79229 Disconnect the correct connection point proxy 2021-12-28 17:09:36 +01:00
Robbert van der Helm c054398965 Increase Win32 message limit for JUCE plugins
They aggressively use the message loop when parts of a plugin's UI
change, sometimes sending as many is 2300 events at once. The old 20
messages per tick limit would cause severe slowdowns in this case.
2021-11-30 03:48:08 +01:00
Robbert van der Helm ce8e4dccdf Move Win32 message limit constant 2021-11-30 03:28:05 +01:00
Robbert van der Helm 5b3210eed6 Inhibit event loop during VST3 offline processing
This prevents T-RackS 5 from causing the export in Bitwig Studio 4.1.0
beta 2 to freeze.
2021-11-10 21:29:40 +01:00
Robbert van der Helm e3f0926aef Allow the group host to terminate cleanly
...before terminating it forcefully. Not sure why this
`TerminateProcess()` was here instead of in `group-host.cpp` in the
first place. This way we don't have to duplicate any destructor
behaviour.
2021-10-16 02:00:39 +02:00