Runs in processBlock (audio thread), stores results in atomics.
MCP get_analysis reads atomics from HTTP thread — zero contention.
Output format: "-14.2 LUFS | TP:-1.1 | sub:ok bass:+3 low:ok mid:ok hi:-2 brill:ok | W:0.72 | bright"
Max ~60 tokens per call."
fix: replace CARemoteLayerServer with CAContext+CALayerHost for cross-process GUI
Sitar118
0548359
Three bugs killed the GUI:
1. CARemoteLayerServer does not capture a hidden NSWindow's content cross-process.
Replaced with CAContext (server) + CALayerHost (client) — the correct private-but-stable
macOS API for cross-process layer embedding, stable from 10.10 through Sequoia.
2. NSWindow was never orderFront: — WindowServer never composited its content.
Fixed: window positioned at (-32000,-32000) and orderFront: called.
3. NSMachBootstrapServer (deprecated on 13+) no longer needed.
contextId (uint32_t) is sent directly over the existing IPC socket.
New file: Source/Shared/PrivateCA.h — declares CAContext, CALayerHost, CGSMainConnectionID.
COMPLETE REWRITE — new approach:
- Plugin loads IN-PROCESS (inside Ableton) like SnappySnap
- GUI shows inside PluginBridge's own editor (no separate window)
- Helper process ONLY used to test if a plugin is safe before loading
- Blocklist persists to disk — unsafe plugins greyed out
- Shared memory / semaphores / audio routing via IPC all removed
Files changed:
- Source/Plugin/PluginBridgeProcessor.h (new: in-process hosting)
- Source/Plugin/PluginBridgeProcessor.cpp (new: direct processBlock)
- Source/Plugin/PluginBridgeEditor.h (new: embeds plugin GUI)
- Source/Plugin/PluginBridgeEditor.cpp (new: resizable, embedded editor)
- Source/Plugin/McpServer.h (simplified: talks to processor directly)
- Source/Plugin/McpServer.cpp (simplified: no helper dependency)
- Source/Plugin/Blocklist.h (NEW: persistent blocklist)
- Source/Plugin/PluginTestRunner.h (NEW: spawns helper to test-load)
- Source/Plugin/PluginTestRunner.cpp (NEW)
- Source/Helper/main.cpp (simplified: test mode only)
- Sourc…