brettw
1
This routine is working fine except for the fact that it’s missing one plugin.
while (scanner->scanNextFile(true, plugin))
{
juce::File file = plugin;
auto plugin_name = file.getFileNameWithoutExtension();
// listbox.addPlugin(plugin_name);
pluginlist.add(plugin_name);
// listbox.addPlugin(plugin_name);
tracker.addPlugin(plugin);
}
private:
juce::VST3PluginFormat pluginFormat;
std::unique_ptr<juce::PluginDirectoryScanner> scanner;
juce::KnownPluginList knownPluginList;
juce::FileSearchPath searchPath = "C:\\Program Files\\Common Files\\VST3";
I can’t seem to find the bug.
ibisum
3
Tried:
while (scanner->scanNextFile(false, plugin))
… ?
brettw
5
I tried that it doesn’t work, all plugins are .VST3
Does anyone have a scanner that works?
ibisum
6
Maybe the sources for pluginval can provide enlightenment:
brettw
7
do
{
descriptions.clear();
juce::String nextPluginFile = scanner->getNextPluginFileThatWillBeScanned();
juce::OwnedArray<juce::PluginDescription> descriptions;
knownPluginList.scanAndAddFile(nextPluginFile, true, descriptions, pluginFormat);
} while (doScan());
bool doScan()
{
if (scanner->scanNextFile(true, plugin))
return true;
}
This is what I came up with, it solves the missing one plugin.
LiamG
8
This is OT, but you can simplify your code by just doing this:
do
{
...
} while (scanner->scanNextFile(true, plugin));
Your doScan() function is missing a return statement at the end, which is undefined behaviour!