Commit Graph

2022 Commits

Author SHA1 Message Date
Robbert van der Helm 553b4474a7 Respect $XDG_DATA_HOME when looking for binaries
Since we're using the XDG base dir package in yabridgectl we were
already doing this there, so it makes sense to also do this in yabridge
itself even though it's very unlikely the user will have this set.
2021-06-23 01:53:18 +02:00
Robbert van der Helm 3ad70678da [yabridgectl] Fix typo in error message 2021-06-23 01:42:02 +02:00
Robbert van der Helm 15e271f70a Fix unity builds after reintroduction of vfork
Boost.Process was being included before this flag was set. Seems safer
to set it in the build anyways.
2021-06-22 19:00:21 +02:00
Robbert van der Helm a3d34f8197 Use vfork() for quick running commands
We can't use it for the Wine plugin host process, but it's perfectly
suitable for these things.
2021-06-22 18:38:49 +02:00
Robbert van der Helm 418cd7b381 Switch to normal urgency desktop notifications
These critical notifications don't expire under KDE Plasma, which would
mean that you'd get absolutely flooded with notifications you have to
manually close when something is wrong.
2021-06-22 18:10:44 +02:00
Robbert van der Helm 75cfc8eaac Fix new watchdog timer environment check
This would of course cause a segfault if the environment variable isn't
defined. The regression was introduced in
8873c11e1d.
2021-06-22 18:06:04 +02:00
Robbert van der Helm 4ab61a77b7 Compare to string view constant instead of string
These are constexpr, so hopefully the compiler can be a bit smarter
about it.
2021-06-22 17:42:37 +02:00
Robbert van der Helm 5ffe4773e9 Show startup errors in a desktop notification
This should make it much easier to spot what goes wrong if you're new to
yabridge and don't know where to look yet.
2021-06-22 17:41:08 +02:00
Robbert van der Helm 8873c11e1d Move watchdog timer disable check to common/utils
We may also want to check this from the plugin.
2021-06-22 17:15:47 +02:00
Robbert van der Helm 333707255e Add missing noexcept specifier 2021-06-22 17:15:47 +02:00
Robbert van der Helm c2b8626ec5 Rearrange declarations to match implementations 2021-06-22 17:15:47 +02:00
Robbert van der Helm 780d562909 Fix plugin host watchdog treating zombies as alive 2021-06-22 17:15:47 +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 437a4dc5ec Add a function for sending desktop notifications 2021-06-22 17:12:31 +02:00
Robbert van der Helm 9f52aca451 Fix typo in the typo fix
Yes.
2021-06-21 18:13:00 +02:00
Robbert van der Helm 5f78f20a6c Fix typo in mount error message 2021-06-21 18:12:32 +02:00
Robbert van der Helm 98c4cc170e Actually use the correct environment 2021-06-21 13:06:26 +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 b81871e4bf Change Wine downgrading instructions for Mint
Grabbing the codename from the repo entry will always result in the
correct one.
2021-06-19 15:15:04 +02:00
Robbert van der Helm 4a7591b193 Put back the recommendation to stick with Wine 6.4
Wine Staging 6.11 seemed to work fine for a bit, but somehow even more
software is broken than in 6.10. And the crashes are not even
deterministic anymore.
2021-06-19 14:31:23 +02:00
Robbert van der Helm 44acf1dedf Move configuration section up in the hierarchy
Doesn't make a lot of sense to have such a lengthy and important section
nested under Usage anymore.
2021-06-19 14:11:33 +02:00
Robbert van der Helm 575870f446 Remove old and manual installation troubleshooting
Timeouts haven't been a thing for over a year since yabridge checks
whether the Wine process has started successfully during initialization,
and the other issues should also not occur during normal usage with
yabridgectl.

This should make the troubleshooting section a bit easier to read
through.
2021-06-19 14:08:16 +02:00
Robbert van der Helm ae1490e147 Replace the search path setup with fsync setup
Or, well, a more general environment setup section, but more tailored to
fsync since you haven't had to modify your search path during normal
usage since yabridge 2.1.0.
2021-06-19 14:04:48 +02:00
Robbert van der Helm 598daabff0 Move downgrading instructions for Wine Staging 2021-06-19 13:51:25 +02:00
Robbert van der Helm eb9c2d9bf9 [yabridgectl] Don't panic on empty wine --version
And print a more descriptive error message instead. This is only
relevant when using a `WINELOADER` that causes `$WINELOADER --version`
to not output anything.
2021-06-16 13:09:20 +02:00
Robbert van der Helm 4c009cb670 Add an environment variable for disabling watchdog
This should only be used when running the Wine process under a separate
namespace.
2021-06-16 01:28:59 +02:00
Robbert van der Helm 4d58adb83f Prevent against environment modifications
Should not be necessary here, but better safe than sorry.
2021-06-16 01:11:36 +02:00
Robbert van der Helm efeb8d7348 Rearrange editor functions 2021-06-15 11:00:22 +02:00
Robbert van der Helm 42e1e49ab9 Remove debug prints 2021-06-13 00:27:24 +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 67e754feb5 Make the maximum block size in VST2 optional 2021-06-12 20:05:39 +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 9ae0e8ca38 [yabridgectl] Use reflinks instead of copies
Whenever available. This should speed up the copying process while also
reducing the amount of disk space wasted on Btrfs and XFS filesystems.
2021-06-12 11:40:24 +02:00
Robbert van der Helm 14ee304256 Silence spurious maybe unused errors
These only show up during unity builds, and they originate from
Boost.Container's small vector. The compiler's diagnostic also doesn't
make any sense here so it's probably just a weird GCC thing.
2021-06-12 00:35:59 +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 b4e0941473 Don't cache reconstructed VST3 events at all
There's no need to since reconstructing the event is very cheap, and
this should be faster (less memory used) and also less error prone
anyways.
2021-06-11 18:18:13 +02:00
Robbert van der Helm fe29def33f Clear reconstructed VST3 events on deserialization
This fixes a regression from 964c150158,
because now the old reconstructed events buffer will stay alive.
2021-06-11 18:13:22 +02:00
Robbert van der Helm 9c30d64975 Fix speaker arrangement bitsets
The sizes were wrong, and Blue Cat Audio's VST3 plugins seem to use the
upper bits to store the channel configuration, which thus got read out
incorrectly.
2021-06-11 17:22:46 +02:00
Robbert van der Helm 78f6921cd8 Also use hashsets for the VST2 opcode dispatch
Should barely make a difference, but it should be as fast or faster.
2021-06-11 14:57:01 +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
Robbert van der Helm dec19dc12a 💥 Reimplement VST3 audio processing
In the same way as 50c25c1cf0 did it for
VST2 plugins. Input and output audio data is now stored in a shared
memory buffer instead of being sent over the sockets. This reduces the
bridging overhead to a minimum since copying data was the most expensive
operation we were doing and we now only need to copy the entire buffer
once per processing cycle.
2021-06-11 13:59:37 +02:00
Robbert van der Helm a7d8063db4 Add getters for channel counts in audio buffers 2021-06-11 13:38:29 +02:00
Robbert van der Helm 340d376564 Add constant overloads for audio buffer pointers 2021-06-11 12:58:46 +02:00
Robbert van der Helm 964c150158 Use the in new place optional extension 2021-06-10 23:44:47 +02:00
Robbert van der Helm f5214b7686 Add an in place std::optional bitsery extension
To avoid unnecessarily recreating the object during deserialization.
This has also been upstreamed to
https://github.com/fraillt/bitsery/pull/78.
2021-06-10 23:43:45 +02:00
Robbert van der Helm 14e3ed2cd3 Add shared audio buffers config to IAudioProcessor::setupProcessing() 2021-06-10 21:37:42 +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 80fa010af5 Prevent unnecessary copies in VST2 event handling 2021-06-10 17:31:32 +02:00