Fix crash: No plugin scanning — just list .vst3/.component files from disk, load on select
Browse files4 unmodified lines5678989101133 unmodified lines45464749505152534849505156575253545562636465666768697071727374757656574 unmodified lines#include "McpServer.h"#include "HostedPluginManager.h"
class PluginBridgeProcessor : public juce::AudioProcessor, private juce::Timerclass PluginBridgeProcessor : public juce::AudioProcessor{public: PluginBridgeProcessor();33 unmodified lines // Load plugin (called on message thread) void loadPluginFromFile(const juce::File& file);
// Plugin scanning — runs on message thread via Timer (safe for NSAlert-showing plugins) void startPluginScan(); bool isScanComplete() const { return scanComplete.load(); } bool isScanning() const { return scanning.load(); } const juce::Array<juce::PluginDescription>& getScannedPlugins() const { return scannedPlugins; } // Plugin listing — just reads filenames, never loads binaries juce::Array<juce::File> getInstalledPluginFiles() const;
private: void timerCallback() override;
HostedPluginManager hostManager; McpServer mcpServer; static constexpr int kDefaultMcpPort = 16620;
// Plugin scan state juce::Array<juce::PluginDescription> scannedPlugins; std::atomic<bool> scanComplete{false}; std::atomic<bool> scanning{false};
// Scanner internals (only alive during scan) struct ScannerState { std::unique_ptr<juce::PluginDirectoryScanner> scanner; bool done = false; }; juce::OwnedArray<ScannerState> scanners; int currentScannerIndex = 0; std::unique_ptr<juce::AudioPluginFormatManager> scanFormatManager; std::unique_ptr<juce::KnownPluginList> scanList;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PluginBridgeProcessor)};Source/PluginBridgeProcessor.h+3-24