integrate AudioAnalyser into Processor + wire get_analysis in McpServer
Browse filesProcessor: adds AudioAnalyser, calls processBlock after shared memory read
McpServer: get_analysis now calls processor's getAnalysis() instead of returning 'silent'"
Source/Plugin/PluginBridgeProcessor.h
CHANGED
|
@@ -5,6 +5,7 @@
|
|
| 5 |
#include "HelperConnection.h"
|
| 6 |
#include "McpServer.h"
|
| 7 |
#include "Blocklist.h"
|
|
|
|
| 8 |
#include "Constants.h"
|
| 9 |
|
| 10 |
class PluginBridgeProcessor : public juce::AudioProcessor
|
|
@@ -58,6 +59,9 @@ public:
|
|
| 58 |
bool isBlocked(const juce::String& path) const;
|
| 59 |
Blocklist& getBlocklist() { return blocklist; }
|
| 60 |
|
|
|
|
|
|
|
|
|
|
| 61 |
// Remote GUI info (from Helper via IPC)
|
| 62 |
juce::String getRemoteLayerPortName() const { return remoteLayerPortName; }
|
| 63 |
int getRemoteGuiWidth() const { return remoteGuiWidth; }
|
|
@@ -66,7 +70,7 @@ public:
|
|
| 66 |
// Callbacks for editor
|
| 67 |
std::function<void()> onPluginLoaded;
|
| 68 |
std::function<void()> onPluginUnloaded;
|
| 69 |
-
std::function<void()> onGuiReady;
|
| 70 |
std::function<void(int, int)> onGuiResized;
|
| 71 |
std::function<void(const juce::String&)> onLoadFailed;
|
| 72 |
|
|
@@ -74,6 +78,7 @@ private:
|
|
| 74 |
HelperConnection helper;
|
| 75 |
std::unique_ptr<McpServer> mcpServer;
|
| 76 |
Blocklist blocklist;
|
|
|
|
| 77 |
|
| 78 |
bool pluginLoaded = false;
|
| 79 |
juce::String pluginName;
|
|
|
|
| 5 |
#include "HelperConnection.h"
|
| 6 |
#include "McpServer.h"
|
| 7 |
#include "Blocklist.h"
|
| 8 |
+
#include "AudioAnalyser.h"
|
| 9 |
#include "Constants.h"
|
| 10 |
|
| 11 |
class PluginBridgeProcessor : public juce::AudioProcessor
|
|
|
|
| 59 |
bool isBlocked(const juce::String& path) const;
|
| 60 |
Blocklist& getBlocklist() { return blocklist; }
|
| 61 |
|
| 62 |
+
// Audio analysis (for MCP get_analysis)
|
| 63 |
+
std::string getAnalysis() const { return analyser.getCompactAnalysis(); }
|
| 64 |
+
|
| 65 |
// Remote GUI info (from Helper via IPC)
|
| 66 |
juce::String getRemoteLayerPortName() const { return remoteLayerPortName; }
|
| 67 |
int getRemoteGuiWidth() const { return remoteGuiWidth; }
|
|
|
|
| 70 |
// Callbacks for editor
|
| 71 |
std::function<void()> onPluginLoaded;
|
| 72 |
std::function<void()> onPluginUnloaded;
|
| 73 |
+
std::function<void()> onGuiReady;
|
| 74 |
std::function<void(int, int)> onGuiResized;
|
| 75 |
std::function<void(const juce::String&)> onLoadFailed;
|
| 76 |
|
|
|
|
| 78 |
HelperConnection helper;
|
| 79 |
std::unique_ptr<McpServer> mcpServer;
|
| 80 |
Blocklist blocklist;
|
| 81 |
+
AudioAnalyser analyser;
|
| 82 |
|
| 83 |
bool pluginLoaded = false;
|
| 84 |
juce::String pluginName;
|