-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_plugin_load.cpp
More file actions
27 lines (21 loc) · 835 Bytes
/
test_plugin_load.cpp
File metadata and controls
27 lines (21 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "PluginLoader.h"
#include <iostream>
int main(int argc, char* argv[]) {
if (argc < 2) {
std::cerr << "Usage: " << argv[0] << " <plugin_path>" << std::endl;
return 1;
}
juce::String pluginPath = argv[1];
juce::File pluginFile(pluginPath);
std::cout << "Testing plugin: " << pluginPath << std::endl;
std::cout << "Exists: " << (pluginFile.exists() ? "yes" : "no") << std::endl;
std::cout << "Is directory: " << (pluginFile.isDirectory() ? "yes" : "no") << std::endl;
juce::String errorMessage;
auto plugin = loadPluginInstance(pluginFile, 48000.0, 256, errorMessage);
if (plugin == nullptr) {
std::cerr << "Error: " << errorMessage << std::endl;
return 1;
}
std::cout << "Success! Loaded: " << plugin->getName() << std::endl;
return 0;
}