Commit Graph

378 Commits

Author SHA1 Message Date
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 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 773b101cd4 Update error messages for chainloading changes 2022-04-16 20:37:11 +02:00
Robbert van der Helm 6f16eb5c76 Print library path in the initialization message
This is useful when chainloading, since it now tells you where eactly
it's loading the library from.
2022-04-16 20:37:11 +02:00
Robbert van der Helm d73a0041eb Find the correct library file from the chainloader
Instead of using this hardcdoed path.
2022-04-16 20:37:11 +02:00
Robbert van der Helm 0487947d91 Export chainloader functions in the plugin libs
These can be called from the new chainlaoder libraries to use yabridge
without needing copies of the full fat `libyabridge-{vst2,vst3}.so`
libraries.
2022-04-16 20:37:11 +02:00
Robbert van der Helm 46af07748b Move desktop notifications to its own header
We'll need to use this from the chainloader.
2022-04-16 20:37:10 +02:00
Robbert van der Helm fde90d7bc3 Pass plugin path around instead of redetecting
This is now set only once at the top level. This is needed for the
chainloading to work because we'll need to set the path when we create
the bridge.
2022-04-16 20:37:10 +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 7b3afa4043 Replace Boost.Dll with our own function
Now we no longer rely on anything from Boost. Later we'll move the path
detection to the very beginning of the plugin bridge initialization so
it can be set from the coming chainloader libraries.
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 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 9eb1d2af3d Change RTTIME warnings and doc for next PW release
The next release will use regular realtime scheduling with no
`RLIMIT_RTTIME` when the user has the permissions to do so by default.
2022-01-17 15:33:42 +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 0e3aba1870 Move the VST3 context menu target implementation
So it can also be used on the Wine side in a bit.
2022-01-03 14:12:25 +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 85f05e0eab Also use rwlocks on the VST3 plugin side 2021-12-28 19:05:56 +01:00
Robbert van der Helm 46b4dc0341 Add missing includes for Boost 1.77 2021-09-27 17:45:59 +02:00
Robbert van der Helm fc19bf74da Comment about performance in bus cache lookups 2021-09-27 17:45:58 +02:00
Robbert van der Helm 9d9eac85ef Store context menu items in unordered maps
The difference in performance won't be noticable, but both lookups and
modifications in these things are much faster once you have more than
one or two elements.
2021-09-27 17:36:48 +02:00
Robbert van der Helm 3950f055ad Fix wording in new warning messages 2021-09-21 15:54:19 +02:00
Robbert van der Helm 7760c4bb6c Show desktop notification for low RLIMIT_RTTIME
For the same reason as the last commit, since people otherwise just miss
this.
2021-09-21 15:40:32 +02:00
Robbert van der Helm e347944e38 Show desktop notification for the memlock warning
Since most people don't try running things in a terminal.
2021-09-21 15:32:47 +02:00
Robbert van der Helm 5613248cda Gate the new resizing behavior behind new option
This interferes with resizing plugins using resize handles, and since it
only helps with two buggy plugins this seems like the best solution
here.
2021-08-16 22:39:13 +02:00
Robbert van der Helm cc9226a3fc Remove editor_double_embed
It's no longer needed after the `fix_local_coordinates()` change from a
fa12c64866a8b79e862bc5db4c4b092a4b762689.
2021-08-16 21:21:57 +02:00
Robbert van der Helm 1883888ec6 Unify exception handling style 2021-08-07 13:17:03 +02:00
Robbert van der Helm 7b05e038c3 Reword memlock warning message 2021-07-23 15:59:13 +02:00
Robbert van der Helm 0e57f410a9 Warn on startup if RLIMIT_MEMLOCK is set too low
This should diagnose issues like #119.
2021-07-18 23:13:51 +02:00
Robbert van der Helm f292158889 Silence some more clangd warnings 2021-07-14 17:11:27 +02:00
Robbert van der Helm 591b2b9ceb Also warn on version mismatch for VST2 plugins 2021-07-13 22:24:02 +02:00
Robbert van der Helm 5fc7acccd1 Show a notification on version mismatch
Between the plugin and the Wine plugin host application.
2021-07-13 22:14:31 +02:00
Robbert van der Helm a06d0bc515 Actually update the supported interface status
With this Waves VST3 plugins now work. But was it worth it?
2021-07-05 16:48:24 +02:00
Robbert van der Helm 4e4bbe1ba4 Replace const-rvalue with rvalue
Since const-rvalue doesn't make any sense.
2021-07-05 16:39:11 +02:00
Robbert van der Helm 1397400155 Reload supported interfaces after IPluginBase::initialize()
This is needed as a workaround to support Waves VST3 plugins.

Right now does does not actually fix the issue because the arguments are
not updated in the subclasses. The next commit will fix this.
2021-07-05 16:08:01 +02:00
Robbert van der Helm d459649f49 Move most of the Meson build to subdirectories
We sadly cannot call `shared_library()` and `executable()` in these
subdirectories while still maintaining the same `build/` directory
structure, but this is still much cleaner. All of the other build
artifacts are now also gone from the root of `build/` so it's cleaner
overall.
2021-07-01 14:57:23 +02:00
Robbert van der Helm c5afb7f215 Append a link to the plugin to the notifications 2021-06-28 13:05:32 +02:00
Robbert van der Helm 20638b7349 Fix missing autoformatting
At some point Doom Emacs broke on-save formatting with lsp-mode in
certain circumstances, and I made these changes with wgrep so apparently
they were never formatted.
2021-06-26 12:27:01 +02:00
Robbert van der Helm e5187db9ef Mark 32-bit yabridge libraries
So we're able to immediately spot that someone is using them from the
logs.
2021-06-24 13:48:23 +02:00
Robbert van der Helm 0156b61e64 Show notification when plugin host fails to start
This one's a bit generic since the relevant output from the Wine process
will have already been printed to the logger before this point.
2021-06-22 17:13:30 +02:00
Robbert van der Helm 466fe3abcf Run $WINELOADER --version under the correct env
This makes the initialization message reflect the correct Wine version
when using a `WINELOADER` script to change between Wine versions
depending on the Wine prefix.
2021-06-21 13:00:05 +02:00
Robbert van der Helm 736b223af8 Set the audioMasterGetTime flags
Apparently this is a thing, and Ardour is the only DAW that respects
them.
2021-06-12 20:36:22 +02:00
Robbert van der Helm 8a754b08cf Only initialize VST2 audio buffers on activation
Ardour apparently always calls `effMainsChanged()` with a value argument
of 0 when unloading the plugin, regardless of whether it has actually
initialized audio processing before that point.
2021-06-12 20:15:20 +02:00
Robbert van der Helm 71cb421032 Reformat the REAPER host functions warning
So it's a bit nicer to look at.
2021-06-12 17:31:15 +02:00
Robbert van der Helm 9c439b62e3 Ignore REAPER host function API requests
Apparently there is a plugin that uses these.
2021-06-12 17:22:47 +02:00
Robbert van der Helm 75dee9991c Don't ignore read/write results
For some reason this only issues warnings on the CI.
2021-06-12 00:02:22 +02:00
Robbert van der Helm aaf3e7438c Use unordered maps for VST3 plugin instances
The better algorithmic time complexity should help when using many (say,
hundreds) of instances of a single VST3 plugin.
2021-06-11 14:48:28 +02:00