From 98244f1ed1dde0d2601b629f496c5843c29f90ad Mon Sep 17 00:00:00 2001 From: Tom Poole Date: Mon, 1 Apr 2019 11:39:45 +0100 Subject: [PATCH] AU: Made the detection of parameters more robust when hosting AU plug-ins --- .../format_types/juce_AudioUnitPluginFormat.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm index 6a02e19618..114509db3f 100644 --- a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm +++ b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm @@ -969,6 +969,9 @@ public: if (prepared) { + if (! haveParameterList) + refreshParameterList(); + if (! syncBusLayouts (getBusesLayout(), true, ignore)) { prepared = false; @@ -1357,6 +1360,7 @@ public: UInt32 paramListSize = 0; AudioUnitGetPropertyInfo (audioUnit, kAudioUnitProperty_ParameterList, kAudioUnitScope_Global, 0, ¶mListSize, nullptr); + haveParameterList = paramListSize >= 0; if (paramListSize > 0) { @@ -1657,6 +1661,7 @@ private: MidiBuffer incomingMidi; std::unique_ptr bypassParam; bool lastProcessBlockCallWasBypass = false, auSupportsBypass = false; + bool haveParameterList = false; void createPluginCallbacks() {