From 8c39d8e3fe59037656c6d85431473e75e71a45ac Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 23 Mar 2021 15:55:48 +0000 Subject: [PATCH 1/4] Docs: Updated the README banner image --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8e4098ae19..a90024d2ed 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![alt text](https://assets.juce.com/juce/JUCE_banner.png "JUCE") +![alt text](https://assets.juce.com/juce/JUCE_banner_github.png "JUCE") JUCE is an open-source cross-platform C++ application framework used for rapidly developing high quality desktop and mobile applications, including VST, AU (and AUv3), From fbe95b0b073ccb589e28255cb0cd56e1382dc2c9 Mon Sep 17 00:00:00 2001 From: reuk Date: Tue, 23 Mar 2021 13:00:25 +0000 Subject: [PATCH 2/4] AudioProcessor: Fix default behaviour of updateHostDisplay This patch fixes an issue where calling `updateHostDisplay` with no argument would have no effect. --- .../juce_audio_processors/processors/juce_AudioProcessor.h | 4 +++- .../processors/juce_AudioProcessorListener.h | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.h b/modules/juce_audio_processors/processors/juce_AudioProcessor.h index 39eac82112..fb7cb3806e 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.h @@ -78,6 +78,8 @@ public: doublePrecision }; + using ChangeDetails = AudioProcessorListener::ChangeDetails; + //============================================================================== /** Destructor. */ virtual ~AudioProcessor(); @@ -991,7 +993,7 @@ public: It sends a hint to the host that something like the program, number of parameters, etc, has changed, and that it should update itself. */ - void updateHostDisplay (const AudioProcessorListener::ChangeDetails& details = {}); + void updateHostDisplay (const ChangeDetails& details = ChangeDetails::getAllChanged()); //============================================================================== /** Adds a parameter to the AudioProcessor. diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorListener.h b/modules/juce_audio_processors/processors/juce_AudioProcessorListener.h index 9a83d06c83..ad9070dffd 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorListener.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorListener.h @@ -69,6 +69,13 @@ public: ChangeDetails withParameterInfoChanged (bool b) const noexcept { return with (&ChangeDetails::parameterInfoChanged, b); } ChangeDetails withProgramChanged (bool b) const noexcept { return with (&ChangeDetails::programChanged, b); } + static ChangeDetails getAllChanged() + { + return ChangeDetails{}.withLatencyChanged (true) + .withParameterInfoChanged (true) + .withProgramChanged (true); + } + private: template ChangeDetails with (Member&& member, Value&& value) const noexcept From 2ac46c600dfa320b74b5ee893d48beb2cb1e5047 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 26 Mar 2021 14:13:28 +0000 Subject: [PATCH 3/4] VST3: Fixed bypass and program parameter indices when JUCE_FORCE_USE_LEGACY_PARAM_IDS=1 and AudioProcessor::getBypassParameter() is implemented --- .../juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp index f76338a6f6..da029bece7 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -302,7 +302,7 @@ private: #endif juceParameters.update (*audioProcessor, forceLegacyParamIDs); - auto additionalLegacyParameterIDIndex = juceParameters.getNumParameters(); + auto numParameters = juceParameters.getNumParameters(); bool vst3WrapperProvidedBypassParam = false; auto* bypassParameter = audioProcessor->getBypassParameter(); @@ -333,8 +333,7 @@ private: { // we need to remain backward compatible with the old bypass id if (vst3WrapperProvidedBypassParam) - vstParamID = static_cast ((isUsingManagedParameters() && ! forceLegacyParamIDs) ? paramBypass - : additionalLegacyParameterIDIndex++); + vstParamID = static_cast ((isUsingManagedParameters() && ! forceLegacyParamIDs) ? paramBypass : numParameters); bypassParamID = vstParamID; } @@ -353,8 +352,7 @@ private: juceParameters.params.add (ownedProgramParameter.get()); - programParamID = static_cast (forceLegacyParamIDs ? additionalLegacyParameterIDIndex++ - : paramPreset); + programParamID = static_cast (forceLegacyParamIDs ? i++ : paramPreset); vstParamIDs.add (programParamID); paramMap.set (static_cast (programParamID), ownedProgramParameter.get()); From 90e8da0cfb54ac593cdbed74c3d0c9b09bad3a9f Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 29 Mar 2021 16:42:19 +0100 Subject: [PATCH 4/4] VST3: Fixed an assertion when JUCE_FORCE_LEGACY_PARAM_IDS=1 due to getProgramParameter() returning the wrong parameter --- modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp index da029bece7..7c326dc355 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -259,7 +259,7 @@ public: //============================================================================== static const FUID iid; Array vstParamIDs; - Vst::ParamID bypassParamID = 0, programParamID = 0; + Vst::ParamID bypassParamID = 0, programParamID = static_cast (paramPreset); bool bypassIsRegularParameter = false; private: @@ -352,7 +352,8 @@ private: juceParameters.params.add (ownedProgramParameter.get()); - programParamID = static_cast (forceLegacyParamIDs ? i++ : paramPreset); + if (forceLegacyParamIDs) + programParamID = static_cast (i++); vstParamIDs.add (programParamID); paramMap.set (static_cast (programParamID), ownedProgramParameter.get());