Commit Graph

1621 Commits

Author SHA1 Message Date
Robbert van der Helm 2ea3f52632 Fix double timestamps in Wine STDERR logger 2021-02-13 17:42:30 +01:00
Robbert van der Helm 0ef15fc911 Add human readable name for effGetTailSize opcode 2021-02-13 17:34:51 +01:00
Robbert van der Helm e57c642cfe Also log IBStream metadata keys 2021-02-13 17:29:35 +01:00
Robbert van der Helm 907925d660 Log process context contents in IInfoListener::setChannelContextInfos 2021-02-13 16:40:24 +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 d887a2905c Add comment about updated size in CheckSizeConstraintResponse 2021-02-12 19:03:48 +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 0642e5d08e Remove todo about STDIO capture and Wine output
This seems to actually work in some cases, but in the instances where it
does not then there would also not be a way around it.
2021-02-12 18:36:16 +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 433d35109a Mention mounting options for NI .iso files
Some Kontakt and Reaktor installation .iso files contain hidden
directories and won't install unless you unhide these first.
2021-02-10 19:24:28 +01:00
Robbert van der Helm 3fbffa532d Move Win32 event handling to one place
Or technically, two, since the group bridge also does the same loop. We
no longer need special handling for VST2 and VST3 plugins, so we can
simplify things a bit here.
2021-02-09 23:45:33 +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 2d62347393 Update old comments 2021-02-09 23:19:13 +01:00
Robbert van der Helm c1b23b90a2 [yabridgectl] Expand libyabridge* auto detection
There are no yabridge packages for Debian and Fedora based distros, but
we'll now also search through the paths used there.
2021-02-06 21:09:30 +01:00
Robbert van der Helm 391206eea8 Work around incorrect wchar_t text serialization
`std::char_traits<wchar_t>::length()` would return the wrong length for
a wide string under Wine, and thus also for `String128`. This would
cause parts of the strings to get cut off. As a workaround we'll just
serialize the entire container including all null bytes at the end.
2021-02-02 15:43:53 +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 27370ab54b Remove debug prints 2021-01-30 23:11:25 +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 8bba5d8773 Mention that REAPER's bridges should be disabled
This can absolutely destroy performance when using VST3 plugins. REAPER
also does something similar with bus information from the audio
thread (for which we had to build in a caching layer), but with these
plugin bridges a VST3 plugin will quickly use ten times as much CPU time
as it should be using.
2021-01-30 19:49:05 +01:00
Robbert van der Helm 68bf2029b3 Fix type of X11 event mask 2021-01-30 16:38:08 +01:00
Robbert van der Helm fc3c3524fd Hide IAudioProcessor::getLatencySamples in logs
On verbosity level 1
2021-01-30 16:11:29 +01:00
Robbert van der Helm fb7531d74b Greatly clean up the input focus grabbing
In commit 9788f21e0e we changed the input
focus grabbing to only grab focus once per event cycle, because
otherwise Bitwig would fight over who was getting focus. This is a bit
hacky, and with this approach you could in theory still have an
unnecessary focus grab 60 times per second (i.e. the default event
polling rate). Now we instead check the current focus target, and only
request focus when it's actually necessary.
2021-01-30 15:40:24 +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 9858db25d2 Show IComponent::getBusCount on verbosity level 1
The only reason this was hidden is because REAPER spams it, but it also
spams `IComponent::getBusInfo` which we cannot hide.
2021-01-30 01:51:14 +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 3f7f67fc2d Get rid of no longer used mutex
This was left over from a very early version of yabridge. It's not
needed since we have to initialize all VST2 plugins from the same thread
anyways.
2021-01-28 23:45:44 +01:00
Robbert van der Helm 62ab9a1c1a Reword comment
Forgot to add this to the last commit.
2021-01-27 21:01:34 +01:00
Robbert van der Helm 6e5ea3a4d8 Skip event loop with partially initialized plugins
This should prevent T-RackS 5 from potentially stalling indefinitely
when using plugin groups.
2021-01-27 19:23:21 +01:00
Robbert van der Helm 72e29d044a Add a function for temporarily blocking event loop
This can be used to prevent the Win32 message loop from running while
there are plugins in some partially initialized state.
2021-01-27 19:00:11 +01:00
Robbert van der Helm 04d0ff0949 Fix serializing silence flags
We didn't initialize the field, and we also didn't copy the updated
value back (since everything else is a pointer to the original data).
This fixes audio channels in REAPER randomly being silence, as this
field would otherwise be uninitialized.

Thanks a lot to @kytdkut for finding this issue!
2021-01-26 23:59:56 +01:00
Robbert van der Helm cf9ae47f99 Return kNotImplemented with vst3_no_scale
Ever since 0bed2b7bc0 REAPER will randomly
not play back one or more audio channels for plugins that support
IPlugViewContentScaleSuport. If you return `kNotImplemented` then this
bug doesn't occur. REAPER should definitely fix this soon. With
`kResultFalse` this issue still occurs, hence this change so you can use
`vst3_no_scale` to work around this REAPER bug.
2021-01-26 22:49:00 +01:00
Robbert van der Helm 2c7fd94f3b Add a TODO for inhibiting the event loop
During the early steps of plugin initialization.
2021-01-26 15:43:10 +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 19fd99b58e Get rid of old fixmes related to the CID migration 2021-01-24 16:55:11 +01:00
Robbert van der Helm 21ff906bf8 Handle connection point proxy from GUI thread
FabFilter plugins will exchange messages that have to be handled from
the GUI thread, or they'll get stuck waiting on a synchronisation
object. This probably hurts GUI performance significantly but luckily it
only affects Ardour.
2021-01-24 15:42:25 +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