wire AudioAnalyser: prepareToPlay + processBlock + MCP callback (3 additions)
Browse files21 unmodified lines2223242525262711 unmodified lines3940414243444546478 unmodified lines56575859606162636453 unmodified lines11811912012112212312412512655 unmodified lines18218318417718518618721 unmodified lines DBG("PluginBridgeProcessor: Helper crashed"); };
// When helper sends "ready" notification with layer port info helper.onGuiReady = [this](const juce::String& portName, int width, int height) { remoteLayerPortName = portName;11 unmodified lines juce::MessageManager::callAsync([this, width, height]() { if (onGuiResized) onGuiResized(width, height); }); };
// Wire audio analysis to MCP get_analysis tool mcpServer->getAnalysisCallback = [this]() { return analyser.getCompactAnalysis(); };
mcpServer->start();}
8 unmodified lines currentSampleRate = sampleRate; currentBlockSize = samplesPerBlock;
// Prepare audio analyser analyser.prepareToPlay(sampleRate, samplesPerBlock);
if (helper.isHelperRunning()) { json cmd = {{"cmd", "configure"},53 unmodified lines }; shm.readOutput(outputPtrs, numChannels, numSamples); header->state.store(kStateIdle);
// Analyse the output audio (post-plugin processing) analyser.processBlock(buffer); }}
55 unmodified lines { pluginLoaded = false; auto error = juce::String(j.value("error", "unknown")); // If plugin failed in helper, blocklist it blocklist.addBlocked(path); if (onLoadFailed) onLoadFailed("Not compatible: " + error);Source/Plugin/PluginBridgeProcessor.cpp+9-2