Commit Graph

671 Commits

Author SHA1 Message Date
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 a1bb522ea0 Move piping stream lines to the log to common 2021-02-12 18:35:07 +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 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 fc3c3524fd Hide IAudioProcessor::getLatencySamples in logs
On verbosity level 1
2021-01-30 16:11:29 +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 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 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 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 19fd99b58e Get rid of old fixmes related to the CID migration 2021-01-24 16:55:11 +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
Robbert van der Helm d5e4424463 Also sync VST3 audio thread scheduling priorities
The exact same thing as the last commit, but for VST3 plugins.
2021-01-23 15:22:10 +01:00
Robbert van der Helm f03b9b1497 Sync VST2 audio thread scheduling priorities
We'll periodically copy the scheduling priorities from the host's audio
threads to the Wine plugin host's audio threads. The overhead of doing
this is about 1 microsecond on my system, so doing this every cycle
really adds up. But getting the Unix epoch time and comparing some
timestamps has a neglegible overhead, so this should give you the best
of both worlds.

Next we'll do the same thing for VST3 plugins.

As suggested by @jhernberg
2021-01-23 15:14:52 +01:00
Robbert van der Helm 33dd469d36 Allow setting different priorities than 5 2021-01-23 14:24:01 +01:00
Robbert van der Helm 34136dd9cc Fix the class ID conversion in plugin factory
This is what you get for mindlessly copy-pasting.
2021-01-22 21:49:45 +01:00
Robbert van der Helm 1b804bd5ea 💥 Convert between UID formats for class IDs
This is a breaking change. Old projects containing VST3 plugins running
through yabridge will no longer work without modifications. I'll write
some scripts to convert the class IDs stored in those project files soon
a migration path.

The UIDs reported by the plugin were apparently wrong, which meant that
the native Linux VST3 version of plugin X and the normal Windows VST3
version of plugin X used different class ideas than the Windows VST3
version of plugin X running through yabridge. Those things are supposed
to be compatible, so we sadly needed to make this change at some point.
2021-01-22 14:24:40 +01:00
Robbert van der Helm 4f4f455f13 Add a todo for a failsafe for the socket cleanup 2021-01-22 14:18:21 +01:00
Robbert van der Helm d3d57a3fe0 Use UID conversion for GetControllerClassId 2021-01-22 14:13:27 +01:00
Robbert van der Helm ae0d7263b8 Use UID conversion for IsPlugInterfaceSupported
I assume that this would also be necessary here, right?
2021-01-22 13:50:06 +01:00
Robbert van der Helm 4a5c961b63 Get rid of unused bitsery FUID extension
This would need a UID conversion to be safe anyway, so it's better to
just get rid of it.
2021-01-22 13:47:11 +01:00
Robbert van der Helm 249b82f846 Add conversions for the garbled UIDs
We'll need this to make sure the reported class IDs match up with the
actual IDs.
2021-01-22 13:47:11 +01:00
Robbert van der Helm 29410e3992 Add fixmes for incorrect byte orders
As pointed out on the Discord. Fixing this will require a breaking
change, but right we report incorrect plugin IDs meaning that projects
saved under Windows cannot be opened under Linux with yabridge so this
really needs a fix.
2021-01-22 01:28:25 +01:00
Robbert van der Helm 4812757f1a Add a function for getting the current priority 2021-01-22 00:44:43 +01:00
Robbert van der Helm 58c687f9d7 Revert "Don't override existing host thread priorities"
This reverts commit 9b0324f4a7.

Since the plugin is initialized from the GUI thread, this doesn't make
any sense.
2021-01-22 00:38:44 +01:00
Robbert van der Helm e84f7425cf Fix reverting to SCHED_OTHER
This still seemed to work, but the `sched_setscheduler` would return an
error code when the priority is set to 5 for SCHED_OTHER (which is of
course not a valid value here).
2021-01-21 20:34:43 +01:00
Robbert van der Helm 9b0324f4a7 Don't override existing host thread priorities
If the thread that's hosting yabridge's plugin is already using realtime
scheduling.
2021-01-21 20:30:08 +01:00
Robbert van der Helm f8ac296ec7 Print the tempo part of VstTimeInfo
At debug level 2. This was needed to debug an issue with Renoise.
2021-01-21 20:04:35 +01:00
Robbert van der Helm dac817323b Add an option to force drag-and-drop under REAPER
This works around a long standing bug in REAPER itself that would
prevent you from dragging files onto any plugin editor window.
2021-01-19 15:11:27 +01:00
Robbert van der Helm 197aadad69 Fix style 2021-01-17 15:32:22 +01:00
Robbert van der Helm 029f797377 Update readme for the current VST3 support status
We still need to do a lot of testing, and before that there are quite a
few things I need to fix or take a look at, but now we at least
technically support all VST 3.7.1 features.
2021-01-17 14:33:24 +01:00
Robbert van der Helm 1c6d3f8fd9 Fully implement IParameterFunctionName
We now support all VST 3.7.1 interfaces! At least, in theory we do.
2021-01-17 14:17:46 +01:00
Robbert van der Helm 6b992e7c9a Add logging for IParameterFunctionName 2021-01-17 14:10:01 +01:00
Robbert van der Helm 4804174dae Add message structs for IParameterFunctionName 2021-01-17 13:42:08 +01:00
Robbert van der Helm 3d8ee1ddf1 Add stubs for IParameterFunctionName 2021-01-17 13:23:17 +01:00
Robbert van der Helm 06f6e6acfc Add a proxy class for IParameterFunctionName
This is the last official VST3 interface we have to implement!
2021-01-17 13:09:29 +01:00
Robbert van der Helm aa1a7a1588 Fully implement IProgress
`IParameterFunctionName` will be the last interface before we _in
theory_ support all VST3 features.
2021-01-17 00:19:48 +01:00
Robbert van der Helm 1dc900aff9 Add logging for IProgress 2021-01-17 00:19:01 +01:00
Robbert van der Helm 30ad506552 Add message structs for IProgress 2021-01-17 00:19:01 +01:00
Robbert van der Helm e840fe3114 Add stubs for IProgress 2021-01-16 18:09:39 +01:00
Robbert van der Helm bfdfd9c341 Add proxy classes for IProgress 2021-01-16 18:02:15 +01:00
Robbert van der Helm 9ddf4b2ae1 Fully implement IProcessContextRequirements 2021-01-16 16:29:21 +01:00
Robbert van der Helm 1ab9056a82 Add logging for IProcessContextRequirements 2021-01-16 16:17:34 +01:00
Robbert van der Helm 77ff3f23d5 Add message structs for IProcessContextRequirements 2021-01-16 16:11:48 +01:00
Robbert van der Helm a2203cfef7 Add stubs for IProcessContextRequirements 2021-01-16 16:09:31 +01:00
Robbert van der Helm 4f416e135a Add a proxy class for IProcessContextRequirements 2021-01-16 15:51:48 +01:00
Robbert van der Helm 73fda0b568 Fully implement IPlugInterfaceSupport
With this we support all VST 3.6.12 interfaces.
2021-01-16 15:19:10 +01:00
Robbert van der Helm 701271c273 Add logging for IPlugInterfaceSupport 2021-01-16 14:49:24 +01:00