Commit Graph

142 Commits

Author SHA1 Message Date
Robbert van der Helm 162aeed661 Only set up VST3 SHM audio buffers in setActive()
This avoids doing the duplicate check (since both `setProcessing()` and
`setActive()` would be called), and this also gets rid of the assumption
added a couple commits ago that `setupProcessing()` is only ever called
once, which is not true.
2022-05-19 14:43:59 +02:00
Robbert van der Helm dedcdefebf Allow resizing shared memory buffers in setActive
REAPER apparently changes bus arrangements between
`IAudioProcessor::setupProcessing()` and `IAudioProcessor::setActive()`.
2022-05-18 18:16:14 +02:00
Robbert van der Helm 1fec4c8860 Change the description in the GPL header 2022-04-16 20:37:10 +02:00
Robbert van der Helm b2a15620f3 Swap Boost.Container's small_vector out for LLVM's
This implementation misses a shrink to fit function, but reassigning the
vector with a fresh one should be equivalent.
2022-04-16 20:37:10 +02: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 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 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 14e3ed2cd3 Add shared audio buffers config to IAudioProcessor::setupProcessing() 2021-06-10 21:37:42 +02:00
Robbert van der Helm 5f4ffed90b Prevent allocations in Vst3Logger::log_query_interface
String constants will be converted to `std::string` because it's not
constexpr yet, and that will allocate for longer strings. Since this
function only prints something when `YABRIDGE_DEBUG_LEVEL` is set to 2
or higher that seems like a waste.
2021-05-31 18:07:19 +02:00
Robbert van der Helm 2bf1c4c5eb Use C++20 [[unlikely]] instead of BOOST_UNLIKELY 2021-05-31 17:50:02 +02:00
Robbert van der Helm df93944f3b Prevent allocations caused by Logger::log_trace
C++ would always construct an `std::string` from the string constant
every iteration. Since this also happened when `YABRIDGE_DEBUG_LEVEL` is
not set to 2, this ended up causing unnecessary allocations.
2021-05-23 00:21:21 +02:00
Robbert van der Helm fcaac219a6 💥 Reduce allocations in VST3 audio sockets
We do this by using this new `MessageReference<T>` type to avoid copying
our `YaAudioProcessor::Process` struct and the contained `YaProcessData`
object. This is only part of the work, but this redesign lets us keep
the these objects alive on both the plugin and the host side. On the
plugin side, we'll simply serialize the data from the referred to object
without copying it. On the Wine side, we'll write the data to a
persistent thread local object, and then reassign the
`MessageReference<T>` to point to that object. This lets us serialize
'references', thus avoiding potentially expensive allocations. With
these last few changes alone VST3 plugins are already at the same
performance level as our optimized VST2 plugin groups.
2021-05-07 16:32:08 +02:00
Robbert van der Helm 9424c36993 Temporarily memoize IPlugView::canResize()
This makes VST3 plugin resizing more responsive, because this function
would otherwise be constantly running in lockstep from the GUI thread.
2021-05-05 19:44:44 +02:00
Robbert van der Helm 75006a537b Split up VST3 logging for UniversalTResult
I was wondering why I couldn't find the overload for `UniversalTResult`,
and as it turns out we would always use this variant (which
unsurprisingly was the very first overload added). We should of course
have separate overloads for this.
2021-05-05 19:38:46 +02: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 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 6b992e7c9a Add logging for IParameterFunctionName 2021-01-17 14:10:01 +01:00
Robbert van der Helm 1dc900aff9 Add logging for IProgress 2021-01-17 00:19:01 +01:00
Robbert van der Helm 1ab9056a82 Add logging for IProcessContextRequirements 2021-01-16 16:17:34 +01:00
Robbert van der Helm 701271c273 Add logging for IPlugInterfaceSupport 2021-01-16 14:49:24 +01:00
Robbert van der Helm 26c78df37c Add logging for IMidiLearn 2021-01-16 13:57:43 +01:00
Robbert van der Helm cc35e89252 Add logging for INoteExpressionPhysicalUIMapping 2021-01-15 19:17:42 +01:00
Robbert van der Helm d9d508a47e Add logging for IComponentHandlerBusActivation 2021-01-14 16:24:46 +01:00
Robbert van der Helm 0d674d6185 Add logging for IPlugViewContentScaleSupport 2021-01-14 14:46:29 +01:00
Robbert van der Helm 2e57631d39 Add logging for IInfoListener 2021-01-12 17:00:58 +01:00
Robbert van der Helm 892aaab65a Add logging for IPrefetchableSupport 2021-01-12 15:33:14 +01:00
Robbert van der Helm 73f3db88e0 Add logging for IUnitHandler2 2021-01-10 23:51:54 +01:00
Robbert van der Helm 609360537c Add logging for IAutomationState 2021-01-10 23:36:11 +01:00
Robbert van der Helm ec1149e5ce Add logging for IXmlRepresentationController 2021-01-08 17:53:30 +01:00
Robbert van der Helm bdfd235ea0 Add logging for IKeyswitchController 2021-01-08 17:05:23 +01:00
Robbert van der Helm 70b667f3b0 Add logging for IEditControllerHostEditing 2021-01-08 16:27:12 +01:00
Robbert van der Helm 0617bfb565 Add logging for IContextMenu 2021-01-07 14:47:00 +01:00
Robbert van der Helm 48787b5e60 Add logging for IContextMenuTarget 2021-01-06 23:49:41 +01:00
Robbert van der Helm 5dffba4584 Implement Vst3ContextMenuProxyImpl destructor 2021-01-06 22:52:35 +01:00
Robbert van der Helm 79319413f5 Add logging for IComponentHandler3 2021-01-06 21:48:02 +01:00
Robbert van der Helm fe8211180f Add logging for IAudioPresentationLatency 2021-01-04 22:25:09 +01:00
Robbert van der Helm 0ed9438ffb AAdd logging for the IComponentHandler2 messages 2021-01-04 21:49:22 +01:00
Robbert van der Helm ace0d789d3 Add logging for the IParameterFinder messages 2021-01-03 23:27:57 +01:00
Robbert van der Helm 792e6ed233 Add logging for the IMidiMapping messages 2021-01-02 23:43:41 +01:00
Robbert van der Helm a3770387cc Add logging for INoteExpressionController messages 2021-01-02 15:42:58 +01:00
Robbert van der Helm 34f8d3b1d2 Update the copyright notices for 2021 2021-01-01 18:54:02 +01:00
Robbert van der Helm 9d24d422d1 Log successful FUnknown::queryInterface calls 2020-12-31 13:13:39 +01:00
Robbert van der Helm 651ebd4db3 Update the ViewRect in checkSizeConstraint() 2020-12-30 14:35:18 +01:00
Robbert van der Helm f85912fd25 Add logging for IUnitData structs 2020-12-29 21:51:53 +01:00
Robbert van der Helm 3704ca8cb0 Add logging for the YaProgramListData structs 2020-12-29 18:37:28 +01:00
Robbert van der Helm 047c7691e2 Flip the logging prefixes
This makes it easier to visually distinguish the direction of the
request.
2020-12-27 23:24:42 +01:00
Robbert van der Helm 163c936286 Add logging for the new IUnitInfo structs 2020-12-27 17:55:22 +01:00
Robbert van der Helm 70c5792593 Implement IUnitInfo::getSelectedUnit 2020-12-27 16:48:47 +01:00