diff --git a/extras/audio plugin demo/Source/PluginProcessor.h b/extras/audio plugin demo/Source/PluginProcessor.h index f8190476b2..ad4fcf3014 100644 --- a/extras/audio plugin demo/Source/PluginProcessor.h +++ b/extras/audio plugin demo/Source/PluginProcessor.h @@ -56,10 +56,10 @@ public: double getTailLengthSeconds() const override; //============================================================================== - int getNumPrograms() override { return 0; } + int getNumPrograms() override { return 1; } int getCurrentProgram() override { return 0; } void setCurrentProgram (int /*index*/) override {} - const String getProgramName (int /*index*/) override { return String::empty; } + const String getProgramName (int /*index*/) override { return "Default"; } void changeProgramName (int /*index*/, const String& /*newName*/) override {} //============================================================================== diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp index 59391af17b..0b848748b6 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -281,6 +281,10 @@ public: setInitialDelay (filter->getLatencySamples()); programsAreChunks (true); + // NB: For reasons best known to themselves, some hosts fail to load/save plugin + // state correctly if the plugin doesn't report that it has at least 1 program. + jassert (af->getNumPrograms() > 0); + activePlugins.add (this); }