It's important that the plugin always returns the full set of available
components.
The plugin may be scanned by a separate process from the 'main' DAW
process, and these processes may report different compatibility levels.
If the scanner has more restricted compatibility than the 'main' DAW
process, then some channel layouts may not be registered, and will be
hidden in the DAW.
Previously, it was possible for the Timer destructor to run after the
last ScopeJuceInitialiser_GUI destructor, which meant that timer
callbacks could continue to be fired (via the appDelegate pointer) after
the static appDelegate instance had been destroyed.
With this change in place, we now ensure the Timer is destroyed before
the ScopedJuceInitialiser_GUI.
This is useful on headless Linux systems. When no display is attached,
window creation is bypassed but a StandalonePluginHolder is still
created, allowing audio to be processed.
The input coordinates were unnecessarily converted and truncated to
integral values before follow up calculations, and then a final
conversion back to integral values.
Reaper uses an undocumented version 0 of the fxbank struct, this could
be handled by JUCE but instead this solution switches to using methods
provided by the VST3 SDK to save and load VST2 states. This also has
the added benefit of no longer requiring the VST2 SDK to build a VST3
plugin that supports saving and loading VST2 states.
The change to the VST3 wrapper in
335f6e9591 broke context menu items in FL
Studio, so that clicking on a menu item had no effect. This could be
seen in the DSPModulePluginDemo example.
I'm not sure exactly what caused the breakage. Before the breaking
change, the menu remained alive until the point where the menu item was
triggered as it was leaked. After the breaking change, the IContextMenu
could be freed before a particular IContextMenuTarget was executed. My
guess is that FL Studio requires the menu to be alive when triggering a
particular menu item.
This change captures the IContextMenu inside the popup menu callback to
ensure that it remains alive until the PopupMenu is destroyed.
The same run loop may be registered multiple times, e.g. if the host
passes the same run loop pointer to multiple instances of the plugin.
When a particular run loop client goes out of scope, it should only
remove its own reference to the run loop, because other clients may
still be active and still using that run loop.
Previously, if the AudioProcessor had disabled buses, the AUv3 wrapper
would attempt to create zero-channel buses to represent the JUCE buses,
which failed.
With this change in place, disabled buses will be created with their
default layout, and then explicitly disabled.
The ScopedJuceInitialiser may have been destroyed before shutdown is
called, in which case singletons will have been deleted and cleared.
Attempting to access the ModalComponentManager here will recreate it,
and will trigger a leak detector warning later on.