Hi all,
I’m pretty new to Juce, so please bear with me.
I’m struggeling getting the file paths correctly set on Windows. I must have read each and every post about the construction of file paths but neither solution seems to work. Everytime I try to access a file I’m getting a null pointer. Currently I’m trying to load a vst Plugin into the This is my last try, to load a plugin dll:
[code]
File test = File::getCurrentWorkingDirectory().getChildFile("C:\\Program Files\\Common Files\\VST3\\Nimbus.vst3");
juce::String pluginPath = test.getFullPathName();
OwnedArray<PluginDescription> pluginDescriptions;
KnownPluginList plist;
AudioPluginFormatManager pluginFormatManager;
pluginFormatManager.addDefaultFormats();
for (int i = 0; i < pluginFormatManager.getNumFormats(); ++i)
plist.scanAndAddFile(pluginPath,
true,
pluginDescriptions,
*pluginFormatManager.getFormat(i));
jassert(pluginDescriptions.size() > 0);
String msg;
VstInstance = pluginFormatManager.createPluginInstance(*pluginDescriptions[0],
48000,
512,
msg);
[\code]
pluginDescriptions.size() always returns zero. I’ not a hundred percent sure it’s related to the file name, since the the defaultFormat array appears to be empty as well (pluginFormatManager.addDefaultFormats() not working?). But since I unsuccesfully tried to load an XML file in the past, I guess it must have something to do with the file Path.
Can you please provide me with a working piece of code to construct a file path on Windows? I’m using Juce 5.4.5 under Windows 10, compiling with CS 2019.
Please help me, I’ getting really frustrated!
Thanks a lot
Patrick