Browse Source

Rejigged the order of initialisation in AudioUnit hosting to try to work around some crashing plugins.

tags/2021-05-28
jules 11 years ago
parent
commit
30e66ba5d8
1 changed files with 12 additions and 3 deletions
  1. +12
    -3
      modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm

+ 12
- 3
modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm View File

@@ -342,15 +342,24 @@ public:
void initialise (double rate, int blockSize)
{
refreshParameterList();
updateNumChannels();
producesMidiMessages = canProduceMidiOutput();
setPluginCallbacks();
setPlayConfigDetails (numInputBusChannels * numInputBusses,
numOutputBusChannels * numOutputBusses,
rate, blockSize);
setLatencySamples (0);
initialiseAudioUnit();
refreshParameterList();
if (parameters.size() == 0)
{
// some plugins crash if initialiseAudioUnit() is called too soon (sigh..), so we'll
// only call it here if it seems like they it's one of the awkward plugins that can
// only create their parameters after it has been initialised.
initialiseAudioUnit();
refreshParameterList();
}
setPluginCallbacks();
}
//==============================================================================


Loading…
Cancel
Save