Commit Graph

914 Commits

Author SHA1 Message Date
Robbert van der Helm e26025f7c6 Allocate shared memory audio buffers for CLAP 2022-09-15 19:12:29 +02:00
Robbert van der Helm 7f07d5f29f Change audio SHM buffer offsets to be in bytes
CLAP allows mixed precision ports. For instance, the main IO ports can
be 32-bit only, while some CV ports allow 64-bit audio. The plugin only
knows the sample format it receives when the process call happens, so
we'll always need to allocate enough space for that to work.
2022-09-15 18:07:56 +02:00
Robbert van der Helm cead56c9aa Skip main thread requirement in array lookups
This should be fine, right? We'll do it everywhere else, but especially
for parameters this is going to be very costly and may thus increase
plugin startup time by a noticeable amount if we spool every individual
call to the main thread.
2022-09-13 18:28:30 +02:00
Robbert van der Helm 168837c8ac Always honor CLAP main thread requirement
If this ever becomes a bottleneck we can always decide to not do it
right there and then.
2022-09-13 18:20:33 +02:00
Robbert van der Helm d5f4d563d4 Implement CLAP note ports extension 2022-09-13 18:20:33 +02:00
Robbert van der Helm 1e6ff797a5 Add serialization structs for note ports extension 2022-09-13 16:58:38 +02:00
Robbert van der Helm 4dbd57d47c Add logging for CLAP extension queries 2022-09-13 14:54:40 +02:00
Robbert van der Helm bb3bc49c60 Fully implement the audio ports extension 2022-09-12 20:11:34 +02:00
Robbert van der Helm 51edef4427 Deduplicate CLAP extension support queries
They're only queried once now and the booleans are derived from the
stored pointers.
2022-09-12 19:14:39 +02:00
Robbert van der Helm b31bee24b6 Store plugin and host extension struct pointers 2022-09-12 19:14:39 +02:00
Robbert van der Helm 65658d3df4 Add serialization structs for audio ports 2022-09-12 19:14:35 +02:00
Robbert van der Helm fa47274dd4 Add stubs for host side audio ports extension 2022-09-12 17:09:01 +02:00
Robbert van der Helm e7fe5426c8 Support the hide_daw option for CLAP. 2022-09-11 19:29:18 +02:00
Robbert van der Helm f64e5c4353 Add logging for CLAP callback requests 2022-09-11 19:18:03 +02:00
Robbert van der Helm 5d31191806 Implement CLAP callback requests 2022-09-11 19:18:03 +02:00
Robbert van der Helm 7151544f99 Add restart and process request callbacks 2022-09-11 19:18:03 +02:00
Robbert van der Helm 200bf1a84e Rename ClapHost::send_message()
To clarify that this is intended for main thread callbacks. Not that
outside of the thread pool extension there are any latency sensitive
audio thread callbacks.
2022-09-11 19:18:03 +02:00
Robbert van der Helm feae63b091 Implement start_processing, stop_processing, reset 2022-09-11 19:18:03 +02:00
Robbert van der Helm c676dfb651 Add CLAP plugin activation and deactivation
Shared memory audio buffers are not yet set up.
2022-09-11 19:18:03 +02:00
Robbert van der Helm 6865cbd937 Implement CLAP plugin initialization 2022-09-11 19:18:03 +02:00
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 d289f6f8cf Free converted file paths in Xdnd proxy 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 653a3a88cb Add serialization for CLAP plugin descriptors 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 98bb4a019b Add CLAP whenever mentioning yabridge libs 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