mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-21 01:24:21 +00:00
Added an assertion to warn if a plugin reports no programs, because this can cause problems in some Sony hosts.
This commit is contained in:
parent
20020a83fe
commit
8a2af98497
2 changed files with 6 additions and 2 deletions
|
|
@ -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 {}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue