Previously, plugin views may be set to unexpected sizes by the host,
which could interrupt size updates due to scale factor changes. This
could leave the plugin view at an incorrect size.
To use this feature, derive your AudioProcessor from
VST3ClientExtensions and override getPluginHasMainInput() to return
false. The main input bus will then be designated as an Aux bus, rather
than a Main bus.
This is mainly useful for synth plugins like vocoders, which may need a
sidechain audio input, but which should replace all audio on the channel
with the output of the synth, rather than mixing with the audio input.
The AAX SDK already checks for truncated IDs internally. If any ID is
truncated, details will be written to Pro Tools' log file (you may need
to enable logging first). Search for "AAX_ASSERT" in the log to find
triggered assertions.
- Add AlertWindow::show() and showAsync() methods that take a MessageBoxOptions argument
- Add NativeMessageBox::show() and showAsync() methods that take a MessageBoxOptions argument
- Update the DialogsDemo to demonstrate the new methods
- Deprecate AlertWindow::showNativeDialogBox() in favour of the NativeMessageBox methods
- Pass button strings specified in MesssageBoxOptions to native dialog boxes correctly
- Use modern TaskDialog on Windows for the native dialog box where available
The old design had us checking isActive inside our audio callbacks, and
also modifying isActive from prepareToPlay(), and releaseResources(). To
avoid race conditions, and to ensure that isActive actually reflects the
activation state of our plugin, we need to lock in these places. If we
don't lock, there's a chance that other threads will observe isActive to
be true while the plugin is not actually active (for example).
If you're not convinced, imagine this scenario:
- The message thread calls prepareToPlay. The plugin is activated.
- The audio thread starts calling processBlock, and gets as far as the
isActive check. The plugin appears active, so we continue into
processBlock.
- At the same time, the message thread calls releaseResources(). The
processBlock call is still in progress, but the message thread is
simultaneously making calls to setProcessing() and setActive(), which
is a race.
Normally, it'd be up to the host of the AudioProcessor to ensure that
prepareToPlay() isn't called at the same time as processBlock().
However, VST3 plugins can request a restart at any time from the UI
thread, requiring us to call prepareToPlay() even while processBlock()
is running.
Previously, IEditController parameter indices were being used to index
into the AudioProcessor parameter array, but these parameter indices are
not guaranteed to point to the same parameter (parameter groups may
cause reordering on JUCE's side). Now, we use the IEditController
indices universally.
Previously, the following plugins were causing issues when hosting their
editors:
- Softube plugins. I used Saturation Knob for testing, which crashed when
deleting the temporary parent view.
- KORG Gadget series, which displayed a black screen after the temporary parent
view was deleted.
- FabFilter Pro-C, which displayed at the wrong scale when opened on a
retina display.
Old PluginDescriptions may only have the `deprecatedUid` field set, with
the `uniqueId` field set to 0. In this case, the uniqueId should be
ignored, and the deprecatedUid used instead.
The plugin should interpret the arguments as VstSpeakerArrangement**
instances. It should modify the pointed-to VstSpeakerArrangement* so
that it points to a long-lived VstSpeakerArrangement in the plugin.
This mostly reverts commit 6e89e61b89.
MIDI FX plugins are allowed to have audio channels, even if they only
produce silence. If a plugin requests a particular bus/channel layout,
the host should respect this request, or attempt to update the layout.
The host should fill all channels that the plugin expects to be filled.
The old commit also meant that we weren't correctly supplying the host
sample rate to MIDI FX plugins.
MIDI FX AudioUnits can retrieve their current sample rate from an output
bus. However, it's reasonable for a JUCE MIDI FX plugin to require 0
output buses, in which case the correct sample rate cannot be retrieved.
This patch modifies the AU wrapper to ensure that MIDI FX plugins will
always have at least one output bus. This bus does not necessarily
correspond to a matching bus in the AudioProcessor, and it will not be
passed to AudioProcessor::processBlock. With the output bus in place,
the correct sample rate is reported in `prepareToPlay`.
Some plugins, such as the 'AGain' demo from the VST3 SDK and Diginoiz
Subdivine segfault when setParamNormalized is called from a background
thread.
This patch attempts to ensure that calls to get/set parameter values can
be made safely from the audio or message threads.
It also adds some MessageManagerLocks around some other calls to the
EditController's member functions which should technically only be made
from the GUI thread.
Finally, it updates the parameter input queues to the IAudioProcessor so
that writing to the queue is wait-free. As part of this change, a new
queue type is introduced which holds up to a single point. This should
improve memory usage for plugins with many parameters.