Is there a way to scan a single plugin file with PluginDirectoryScanner?

Is there a way to make PluginDirectoryScanner to scan a single specific plugin file, instead of a whole folder of plugins?

Obviously one could skip all plugins which don’t match the name of the wanted plugin, but that involves redundant code. Is there a more direct method to achieve this?

1 Like

I do it like this:

void HostProcess::scanFile (const juce::File& file)
    if (file.hasFileExtension ("vst3"))
        pluginFormat = std::make_unique<juce::VST3PluginFormat>();
    else if (file.hasFileExtension ("component"))
        pluginFormat = std::make_unique<juce::AudioUnitPluginFormat>();

    if (pluginFormat)
        pluginList.scanAndAddFile (file.getFullPathName(), false, descriptions, *pluginFormat);

    DBG ("Found types: " << descriptions.size());
1 Like

I’m interested in knowing if the below function actually needs to be taken care of the application itself, or if JUCE already takes care of it when instantiating the plugins:

bool AudioPluginFormat::requiresUnblockedMessageThreadDuringCreation(const PluginDescription&) const