Fix crash: No plugin scanning — just list .vst3/.component files from disk, load on select
Browse files
Source/PluginBridgeProcessor.h
CHANGED
|
@@ -5,8 +5,7 @@
|
|
| 5 |
#include "McpServer.h"
|
| 6 |
#include "HostedPluginManager.h"
|
| 7 |
|
| 8 |
-
class PluginBridgeProcessor : public juce::AudioProcessor
|
| 9 |
-
private juce::Timer
|
| 10 |
{
|
| 11 |
public:
|
| 12 |
PluginBridgeProcessor();
|
|
@@ -46,33 +45,13 @@ public:
|
|
| 46 |
// Load plugin (called on message thread)
|
| 47 |
void loadPluginFromFile(const juce::File& file);
|
| 48 |
|
| 49 |
-
// Plugin
|
| 50 |
-
|
| 51 |
-
bool isScanComplete() const { return scanComplete.load(); }
|
| 52 |
-
bool isScanning() const { return scanning.load(); }
|
| 53 |
-
const juce::Array<juce::PluginDescription>& getScannedPlugins() const { return scannedPlugins; }
|
| 54 |
|
| 55 |
private:
|
| 56 |
-
void timerCallback() override;
|
| 57 |
-
|
| 58 |
HostedPluginManager hostManager;
|
| 59 |
McpServer mcpServer;
|
| 60 |
static constexpr int kDefaultMcpPort = 16620;
|
| 61 |
|
| 62 |
-
// Plugin scan state
|
| 63 |
-
juce::Array<juce::PluginDescription> scannedPlugins;
|
| 64 |
-
std::atomic<bool> scanComplete{false};
|
| 65 |
-
std::atomic<bool> scanning{false};
|
| 66 |
-
|
| 67 |
-
// Scanner internals (only alive during scan)
|
| 68 |
-
struct ScannerState {
|
| 69 |
-
std::unique_ptr<juce::PluginDirectoryScanner> scanner;
|
| 70 |
-
bool done = false;
|
| 71 |
-
};
|
| 72 |
-
juce::OwnedArray<ScannerState> scanners;
|
| 73 |
-
int currentScannerIndex = 0;
|
| 74 |
-
std::unique_ptr<juce::AudioPluginFormatManager> scanFormatManager;
|
| 75 |
-
std::unique_ptr<juce::KnownPluginList> scanList;
|
| 76 |
-
|
| 77 |
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PluginBridgeProcessor)
|
| 78 |
};
|
|
|
|
| 5 |
#include "McpServer.h"
|
| 6 |
#include "HostedPluginManager.h"
|
| 7 |
|
| 8 |
+
class PluginBridgeProcessor : public juce::AudioProcessor
|
|
|
|
| 9 |
{
|
| 10 |
public:
|
| 11 |
PluginBridgeProcessor();
|
|
|
|
| 45 |
// Load plugin (called on message thread)
|
| 46 |
void loadPluginFromFile(const juce::File& file);
|
| 47 |
|
| 48 |
+
// Plugin listing — just reads filenames, never loads binaries
|
| 49 |
+
juce::Array<juce::File> getInstalledPluginFiles() const;
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
private:
|
|
|
|
|
|
|
| 52 |
HostedPluginManager hostManager;
|
| 53 |
McpServer mcpServer;
|
| 54 |
static constexpr int kDefaultMcpPort = 16620;
|
| 55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PluginBridgeProcessor)
|
| 57 |
};
|