RAM2118 commited on
Commit
3853310
·
verified ·
1 Parent(s): 399b070

Sprint 1: Add PluginBridgeProcessor.h — audio passthrough shell

Browse files
Files changed (1) hide show
  1. Source/PluginBridgeProcessor.h +48 -0
Source/PluginBridgeProcessor.h ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ #include <juce_audio_processors/juce_audio_processors.h>
4
+ #include <juce_dsp/juce_dsp.h>
5
+ #include "McpServer.h"
6
+
7
+ class PluginBridgeProcessor : public juce::AudioProcessor
8
+ {
9
+ public:
10
+ PluginBridgeProcessor();
11
+ ~PluginBridgeProcessor() override;
12
+
13
+ // AudioProcessor interface
14
+ void prepareToPlay(double sampleRate, int samplesPerBlock) override;
15
+ void releaseResources() override;
16
+ void processBlock(juce::AudioBuffer<float>&, juce::MidiBuffer&) override;
17
+
18
+ // Editor
19
+ juce::AudioProcessorEditor* createEditor() override;
20
+ bool hasEditor() const override { return true; }
21
+
22
+ // Plugin identity
23
+ const juce::String getName() const override { return "PluginBridge"; }
24
+ bool acceptsMidi() const override { return true; }
25
+ bool producesMidi() const override { return true; }
26
+ double getTailLengthSeconds() const override { return 0.0; }
27
+
28
+ // Programs (unused)
29
+ int getNumPrograms() override { return 1; }
30
+ int getCurrentProgram() override { return 0; }
31
+ void setCurrentProgram(int) override {}
32
+ const juce::String getProgramName(int) override { return {}; }
33
+ void changeProgramName(int, const juce::String&) override {}
34
+
35
+ // State
36
+ void getStateInformation(juce::MemoryBlock& destData) override;
37
+ void setStateInformation(const void* data, int sizeInBytes) override;
38
+
39
+ // MCP server access (for editor status display)
40
+ bool isMcpServerRunning() const;
41
+ int getMcpServerPort() const;
42
+
43
+ private:
44
+ McpServer mcpServer;
45
+ static constexpr int kDefaultMcpPort = 16620;
46
+
47
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PluginBridgeProcessor)
48
+ };