Browse Source

VST3 Host: Read new moduleinfo.json location

v7.0.9
reuk 2 years ago
parent
commit
7c53711ce0
No known key found for this signature in database GPG Key ID: FCB43929F012EE5C
1 changed files with 11 additions and 3 deletions
  1. +11
    -3
      modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp

+ 11
- 3
modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp View File

@@ -856,10 +856,8 @@ private:
//==============================================================================
struct DescriptionLister
{
static std::vector<PluginDescription> findDescriptionsFast (const File& file)
static std::vector<PluginDescription> tryLoadFast (const File& file, const File& moduleinfo)
{
const auto moduleinfo = file.getChildFile ("Contents").getChildFile ("moduleinfo.json");
if (! moduleinfo.existsAsFile())
return {};
@@ -877,6 +875,16 @@ struct DescriptionLister
return createPluginDescriptions (file, *parsed);
}
static std::vector<PluginDescription> findDescriptionsFast (const File& file)
{
const auto moduleinfoNewLocation = file.getChildFile ("Contents").getChildFile ("Resources").getChildFile ("moduleinfo.json");
if (const auto loaded = tryLoadFast (file, moduleinfoNewLocation); ! loaded.empty())
return loaded;
return tryLoadFast (file, file.getChildFile ("Contents").getChildFile ("moduleinfo.json"));
}
static std::vector<PluginDescription> findDescriptionsSlow (VST3HostContext& host,
IPluginFactory& factory,
const File& file)


Loading…
Cancel
Save