PluginDirectoryScanner & multiple plugin formats

Hi!
I can successfully scan VST3 plugins with PluginDirectoryScanner by providing VST3PluginFormat:

juce::VST3PluginFormat  pluginFormat;
std::unique_ptr<PluginDirectoryScanner> scanner;
/*  ...  */
scanner.reset(new PluginDirectoryScanner(knownPluginList,
                                         pluginFormat,
                                         searchPath,
                                         false,
                                         File(),
                                          true));

The question is how to scan AudioUnit format (or any other), too? I mean, should I create a new PluginDirectoryScanner for each format I want to scan?

Wouldn’t it be reasonable to have another constructor where I could provide an Array of AudioPluginFormats? Or to have a method: PluginDirectoryScanner::addPluginFormat(AudioPluginFormat pluginFormat)

Thanks!

Yes you should create 1 scanner per format.
Scanning plugins of various formats is done differently, and also they are usually stored in different folders.
So it does not make sense to have a single scanning process.

That being said, you could easily create a method that simply takes a FileSearchPath and takes care of creating 1 scanner per format behind the scene. It’s just that it will end up wasting time scanning in all folders for all formats.

2 Likes