Commit Graph

729 Commits

Author SHA1 Message Date
Robbert van der Helm 071bb157ad Move the pid_running() function to common utils
We're going to need this for our watchdog.
2021-05-01 17:08:47 +02:00
Robbert van der Helm 7881e0116e Rename host_guard_handler to host_watchdog_handler
To keep the terminology consistent.
2021-05-01 15:46:27 +02:00
Robbert van der Helm 564e047b4b Remove the Ardour warning for VST3 plugins 2021-05-01 12:53:38 +02:00
Robbert van der Helm 52428c8749 Also fix mutual recursion across both components
When setting the state on the audio processor, it can happen that plugin
triggers a resize from the edit controller. We should also be able to
handle that situation.
2021-04-30 02:11:24 +02:00
Robbert van der Helm 949ddaf673 Use mutual recursion for IEditController::setState
With this we should be able to handle `setState()`s that try to resize
the currently open editor. This could pop up when using the preset
browser in REAPER with plugins that recall their old size when loading a
preset.
2021-04-30 01:15:18 +02:00
Robbert van der Helm 0f506f75e4 Bypass connection point proxies when possible
This greatly improves compatibility with VST3 plugins in Ardour and
Mixbus. Most notably the FabFilter plugins would previously freeze when
having the GUI open while duplicating or inserting new instances.
2021-04-29 15:36:28 +02:00
Robbert van der Helm 6f6e6c5b94 Reword caching to prefetching
Since that makes it much clearer what we're actually doing. With old
`cache_time_info` was actually caching the response, but now we're
querying it before the plugin has even requested the information.
2021-04-29 01:07:14 +02:00
Robbert van der Helm c82eb35243 Also cache audioMasterGetCurrentProcessLevel()
Melda plugins seem to call this during every processing cycle.
2021-04-29 01:02:10 +02:00
Robbert van der Helm 383b0c3f10 Remove the cache_time_info option
The new time info caching behaviour supersedes this by getting rid of
callbacks altogether.
2021-04-29 00:46:43 +02:00
Robbert van der Helm 1deb4cf664 Send the VST2 transport info along with processing
And cache it during the processing cycle. This greatly reduces the
overhead of bridging VST2 plugins.
2021-04-29 00:32:25 +02:00
Robbert van der Helm 93f089eca7 Always set FTZ instead of gating it behind a flag
After a quick round of testing it seems like REAPER doesn't always
enable this on the audio thread, but Bitwig, Ardour, Carla and Renoise
do. So it should be safe to just get rid of the option and to leave this
enabled all the time.
2021-04-28 12:07:14 +02:00
Robbert van der Helm 2be41da9b6 Add compatibility option to force flushing to zero
This prevents Kush Audio REDDI from taking down the DAW when the host
passes it denormalized audio to process. I've discovered that the issue
with this plugin had to do with denormals in the issue linked below, but
I didn't realize that we can just enable the FTZ flag for plugins that
don't already do so.

https://github.com/osxmidi/LinVst/issues/174
2021-04-27 23:33:50 +02:00
Robbert van der Helm ee50044062 Also allow hiding the host for VST3 plugins 2021-04-27 18:50:47 +02:00
Robbert van der Helm 3a73fb9689 Allow hiding the DAW name for VST2 plugins
This can be useful when plugins have (broken) host-specific behaviour
that you want to avoid. I'll later add a list of host/plugin
combinations where this may be useful to the readme.
2021-04-27 18:41:36 +02:00
Robbert van der Helm 93df3fa1da Fix mismatching types in 2aadf52 #95
`wine_path` was a string, and `boost::process::search_path()` returns an
`boost::filesystem::path`. We should just be using paths here anyways.
2021-04-26 19:25:28 +02:00
Kira Bruneau 2aadf5256b Fix printing wine version with custom WINELOADER
- Don't call bp::search_path when using WINELOADER. It will return an
  empty string for an absolute path.

- To match the behaviour of the exe wrapper scripts, only print the
  wine version from WINELOADER if the path is executable.
2021-04-26 19:20:10 +02:00
Robbert van der Helm 68c846324c Also explicitly list simple dispatcher opcodes 2021-04-25 23:07:24 +02:00
Robbert van der Helm 0d1cb0bd77 Move special effVendorSpecific handling for REAPER
It's a bit less hacky if we do the effVendorSpecific check where we're
supposed to be checking for those things.
2021-04-24 20:23:23 +02:00
Robbert van der Helm 4937010557 Fix some of the clang-tidy lints 2021-04-14 16:09:54 +02:00
Robbert van der Helm a297866d45 Add way to use 32-bit VST3 when both are installed
Otherwise we would always use the 64-bit version and there would be no
way to use the 32-bit version, if version for some reason works better.

Relates to #80.
2021-04-13 19:28:36 +02:00
Robbert van der Helm f177b69aae Re-enable loading 32-bit VST3 plugins #80 2021-04-12 22:38:36 +02:00
Robbert van der Helm 653dcc6843 Fix linking with unity builds and VST3 SDK 3.7.2 2021-04-03 18:54:33 +02:00
Robbert van der Helm b036230067 Work around a regression in Wine 6.5
Killing a Wine process no longer terminates its threads, see the
changelog entry and NOTE for more information.
2021-03-27 17:41:15 +01:00
Robbert van der Helm 260aba393c Fix alignment in initialization message 2021-02-14 13:50:55 +01:00
Robbert van der Helm f07503b9b6 Print the matched config file section
To make it more obvious where settings are being set from.
2021-02-14 13:50:53 +01:00
Robbert van der Helm c9fbd0627f Rewrite the architecture document for VST3 support
This now also goes more in depth on the more interesting parts of
yabridge's implementation while skimming over lesser useful technical
bits.
2021-02-14 00:48:15 +01:00
Robbert van der Helm 4f8eaaaa75 Refactor plugin factories into Vst3*Proxy format
Now every proxy object that's directly created by the host or plugin
shares the same structure.
2021-02-13 15:42:05 +01:00
Robbert van der Helm 4e4ed3a6b4 Don't serialize input output info for IComponent::getRoutingInfo
Yes, input output info.
2021-02-12 19:24:33 +01:00
Robbert van der Helm 67091bc13c Don't serialize input info for IComponent::getBusInfo 2021-02-12 19:12:49 +01:00
Robbert van der Helm e62bd603f9 Don't serialize input arrangement for IAudioProcessor::getBusArrangement 2021-02-12 19:08:51 +01:00
Robbert van der Helm 2020acfec1 Don't serialize input info for IEditController::getParameterInfo 2021-02-12 19:02:27 +01:00
Robbert van der Helm 5978247a0b Don't serialize input size for IPlugView::GetSize 2021-02-12 18:58:33 +01:00
Robbert van der Helm 3e24610d81 Remove todo about moving find_vst_host
Given the other functions in this file that mostly deal with locating
files and modifying the environment it makes sense to also have this
here.
2021-02-12 18:43:31 +01:00
Robbert van der Helm a1bb522ea0 Move piping stream lines to the log to common 2021-02-12 18:35:07 +01:00
Robbert van der Helm dd0eb02970 Disable loading 32-bit VST3 plugins
There is some sort of memory corruption going on and these plugins
usually segfault on the audio thread. I'm clueless as to what could be
causing this (I wouldn't be surprised if this is caused by an
interaction between the VST3 SDK and Wine's Windows.h implementation),
but it's probably best to disable loading 32-bit VST3 plugins completely
until this has been fixed.
2021-02-11 13:55:44 +01:00
Robbert van der Helm cc5480a224 Fix loading 32-bit VST3 plugins
This is why GHC warns on shadowing by default. Probably.
2021-02-10 21:03:07 +01:00
Robbert van der Helm a91fad2217 Clean up interface checks in VST3 plugin factory
Even though the interface ID is passed as an FIDString and there is a
function to compare FIDStrings obviously doesn't mean that you're
supposed to use them! Duh.
2021-02-09 23:40:55 +01:00
Robbert van der Helm 10b01b5140 Update comments on the VST3 info caches 2021-02-09 23:19:17 +01:00
Robbert van der Helm 81d401f06a Add mutexes for the VST3 data caches
Since the restart will always be called from another thread, and when a
plugin asks for a restart during initialization this can quickly lead to
issues.
2021-01-30 23:26:57 +01:00
Robbert van der Helm b5dd806b2d Cache VST3 parameter information
This is in some cases needed to get decent performance in REAPER, as
REAPER seems to query this information (which cannot change without the
plugin requesting a restart) four times per second.
2021-01-30 22:24:05 +01:00
Robbert van der Helm 1043776e52 Differentiate between cached values in logs
If it turns out we forgot to flush this cache in some place.
2021-01-30 13:56:58 +01:00
Robbert van der Helm 68e10cd24c Flush the bus info cache in more places
The current approach 'works', but better err on the safe side. Once this
caching layer is no longer necessary we should just remove it.
2021-01-30 13:48:42 +01:00
Robbert van der Helm 0adca3e33c Revert "Remove cache_time_info and always cache time info"
This reverts commit cfb171c991.

No idea why, but this cache breaks SPL Transient Designer Plus. Perhaps
it overwrites the time info?
2021-01-30 02:37:27 +01:00
Robbert van der Helm 10b7930779 Also clear bus cache on IAudioProcessor::setActive
Now we need a workaround for our REAPER workaround because REAPER
doesn't follow the audio processing workflow diagram, amazing!
2021-01-30 01:42:20 +01:00
Robbert van der Helm 6339618984 Fix response logging filtering with bus info cache
The response logging wasn't getting filtered.
2021-01-30 00:45:45 +01:00
Robbert van der Helm cfb171c991 Remove cache_time_info and always cache time info
It sort of goes against yabridge's principles to not do these
unnecessary `audioMasterGetTime()` calls if the plugin does that, but it
also hurts the user experience to not have this as a default.
2021-01-30 00:20:35 +01:00
Robbert van der Helm f5b4a28bd0 Cache bus information during processing
This works around an issue with REAPER. During every processing cycle
REAPER would query how many input and output busses we have, and it
would then enumerate over all of those busses. This meant that if a VST3
plugin has 32 output busses, then REAPER will do 34 extra function calls
before processing audio.
2021-01-30 00:02:06 +01:00
Robbert van der Helm ffe46e225c Relay Wine STDIO with SCHED_OTHER
I haven't seen this cause issues myself, but it would not surprise me if
a plugin that produces a constant stream of FIXMEs would steal resources
from audio processing if the threads that are relaying those messages
are set to SCHED_FIFO.
2021-01-24 17:02:56 +01:00
Robbert van der Helm 77414c80d6 Allow null pointers in IEditController::setComponentHandler 2021-01-24 14:51:18 +01:00
Robbert van der Helm 0044bc6b60 Allow passing null pointers to IPlugView::setFrame 2021-01-24 14:44:42 +01:00