Commit Graph

868 Commits

Author SHA1 Message Date
Robbert van der Helm 823f6bb239 Prevent realtime scheduling for ad-hoc acceptors
I noticed that there were some realtime adhoc-acceptors running on my
system. That should of course not happen, since these only exist to
catch some sporadic (and likely as a result of a badly behaving plugin)
mutual recursion on the audio thread.
2022-02-08 02:20:18 +01:00
Robbert van der Helm 78f9b00a81 Fix missing option name in last commit 2022-01-15 14:32:51 +01:00
Robbert van der Helm 02a66cba16 Update tomlplusplus dependency to 3.0.1
Last minute update because Arch started packaging this version yesterday
and there are breaking API changes compared to version 2.5.x.
2022-01-15 14:27:34 +01:00
Robbert van der Helm 390df5c264 Add check flag to Meson run_command()
The default value will change soon, so Meson is now showing warnings if
you haven't set an explicit value.
2022-01-15 13:59:03 +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 89cd1e9ee3 Fix IContextMenuTarget::ExecuteMenuItem logging 2022-01-03 15:17:35 +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 9682446fab Remove incorrect line feeds from log output
These were probably added here out of habit.
2021-11-10 20:41:32 +01:00
Robbert van der Helm 9aca27a192 Don't filter out empty environment variables
This check was only needed because `operator[]` inserts an empty entry
if the variable doesn't exist. Wine also complains when `WINEPREFIX` is
empty, so we should probably not try to have our own behavior here.
2021-10-17 16:15:48 +02:00
Robbert van der Helm 1eaee22bb9 Prevent some allocations in environment lookups
In some places we'll still use the allocating non-const `operator[]`
just because it would otherwise become pretty unreadable.
2021-10-17 16:10:13 +02:00
Robbert van der Helm 93ab5126b2 Rename YABRIDGE_TEMP_PATH to YABRIDGE_TEMP_DIR
I liked the `_PATH` version better initially, but the `_DIR` verison has
a better ring to it and it's more consistent with `$XDG_RUNTIME_DIR`. #139
2021-10-16 02:04:31 +02:00
Robbert van der Helm 3257b9c32e Add an environment variable for custom temp dirs
This would be useful if you need to do some elaborate namespacing setup
and want all sockets and other temporary files in a single directory
instead of in `${XDG_RUNTIME_DIR:/tmp}`.

This resolves #139.
2021-10-16 01:41:48 +02:00
Robbert van der Helm 0c9c4686f1 Use the small buffer optimization for VST3 SysEx
We apparently didn't do that yet. SysEx should be super rare (outside of
octave switching on Arturia keyboards), but there's still no reason not
to do it.
2021-09-23 14:29:12 +02:00
Robbert van der Helm 5bf3b97118 Hide symbols in VST3 static libraries
I noticed a couple of UID/string conversion related symbols showing up
in the text section.
2021-08-17 15:50:08 +02:00
Robbert van der Helm c1b4410e6b Don't include angular brackets for concrete types
In the VST2 log output. I just use this syntax as a more descriptive
handwavy substitute for the actual data.
2021-08-17 15:15:33 +02:00
Robbert van der Helm f55a04a1fc Fix VST2 logging message for effEditGetRect() 2021-08-17 15:12:08 +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 6fab25cabf Remove unnecessary early return 2021-08-16 21:21:57 +02:00
Robbert van der Helm e6f0fe16d8 Target VST3 SDK version 3.7.3 2021-08-10 17:14:48 +02:00
Robbert van der Helm 1883888ec6 Unify exception handling style 2021-08-07 13:17:03 +02:00
Robbert van der Helm 9160de6483 Implement VST2 SysEx events
Apparently these _are_ actually used. Sometimes.
2021-08-04 21:40:09 +02:00
Robbert van der Helm 5c3491c1e1 Use exception logger for the memory locking error 2021-07-23 15:53:19 +02:00
Robbert van der Helm 1a34a80c21 Add a special exception logger
We'll need this to make sure that we can redirect caught exceptions
printed in `src/common/` to the correct file if `YABRIDGE_DEBUG_FILE` is
set.
2021-07-23 15:46:08 +02:00
Robbert van der Helm b1fc5233d1 Add missing copyright headers 2021-07-20 17:33:26 +02:00
Robbert van der Helm 640c188338 Fix duplicate timestamps in Wine log messages
Regression caused by the merging of these two functions in a1cb3b6.
2021-07-20 04:09:19 +02:00
Robbert van der Helm a1cb3b614b Add a +editor flag to YABRIDGE_DEBUG_LEVEL 2021-07-20 03:01:16 +02:00
Robbert van der Helm 9fcf91dc72 Oops. (fix inverted conditional from last commit) 2021-07-20 02:39:17 +02:00
Robbert van der Helm 138dfb3284 Fix regression in pid_running from d99f571
In some cases we would treat dead processes as not running (we could
also get EAVAIL instead of EINVAL, so it's better to just check the one
thing we should treat as a success instead).
2021-07-20 02:35:24 +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 fe61a28524 Print a distinct error when mmap() returns EAGAIN
As mentioned in #119.
2021-07-18 23:13:42 +02:00
Robbert van der Helm 3c14f0391b Move memory mapping setup to a function
So we don't need to repeat this twice.
2021-07-18 22:40:04 +02:00
Robbert van der Helm d99f571c05 Treat EACCES for pid_running() as alive
When the user has some sort of hardening going on, we might not be able
to read the Wine process's memory. In that case this check would return
`false` even though the process is still running. To combat this, we
should explicitly check for `EINVAL` which is returned when the file
doesn't exist at all or when it's a broken 'symlink' (even though it
isn't really a symlink).
2021-07-18 14:54:12 +02:00
Robbert van der Helm 5f5a7bbdd2 Only call ftruncate() when size > 0
Either Boost or Linux really doesn't like it if you ftruncate() shared
memory down to 0 bytes.
2021-07-17 22:01:29 +02:00
Robbert van der Helm 0c816b0046 Only ignore -Wmaybe-uninitialized on GCC
An ifdef sounds like a better approach than ignoring two additional
warnings.
2021-07-14 17:18:44 +02:00
Robbert van der Helm f292158889 Silence some more clangd warnings 2021-07-14 17:11:27 +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 4013aea63a Include the configuration as a dependency
Apparently this wasn't even supposed to work, so it's probably a good
idea to do it properly before things break.
2021-07-13 22:05:11 +02:00
Robbert van der Helm d21073f866 Escape spaces in URI encoding 2021-07-11 17:24:53 +02:00
Robbert van der Helm 83951200bb Add a function for URL encoding file paths 2021-07-11 17:19:45 +02:00
Robbert van der Helm a58a1ab111 Update parameter name in header
Apparently this wasn't saved yet when I commited
a06d0bc515.
2021-07-05 18:29:04 +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 9edae35304 Don't build 64-bit plugin hosts on 32-bit systems
This should in theory work.
2021-07-01 15:16:56 +02:00
Robbert van der Helm e1e5c8beae Move the VST3 SDK patching 2021-07-01 15:15:20 +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 8dd3e091fb Move VST3 SDK deps to a separate meson.build file
We should only have the global options in the main meson.build file. It
made sense to keep everything in one place at one point, but an 800 line
build script becomes a bit difficult to skim through.
2021-07-01 14:57:23 +02:00