refactor(bridge): split fx bridge, stabilize VST3 host chain, drop old install engines

- remove diagnostic canaries from audio hot path (crackle fix) and
  stuck C5 note raw-MIDI test (Vst2Instrument::init noteOff)
- split native bridge into daw_vst_bridge (VSTi) + fx_vst_bridge (VST FX)
- VST3: processData prepare before setActive, zero input buses, accept
  both .vstpreset and bridge-state blob in RenderJob presets
- native_render/vst_engine: bridge-exe discovery + render_fx_chain + /fx-gui
- delete old install/ engine binaries (install via sidecar+resources now)
- add BUILD_LAYOUT.md, build_selfcheck, tools/ diagnostics
This commit is contained in:
2026-08-20 09:42:42 +07:00
parent 5df96aef1e
commit 7c22ae1f02
42 changed files with 2363 additions and 210 deletions
+15 -6
View File
@@ -321,12 +321,6 @@ bool Vst3Instrument::loadPlugin(const std::string& path, double sampleRate) {
std::cerr << "[Vst3Instrument] setupProcessing failed" << std::endl;
return false;
}
if (component->setActive(true) != kResultOk) {
std::cerr << "[Vst3Instrument] setActive failed" << std::endl;
return false;
}
processor->setProcessing(true);
// Build per-bus buffers sized maxBlockSize_ (HostProcessData owns them;
// we must NOT override channelBuffers with external pointers — unprepare
// would delete[] them).
@@ -335,6 +329,13 @@ bool Vst3Instrument::loadPlugin(const std::string& path, double sampleRate) {
return false;
}
if (component->setActive(true) != kResultOk) {
std::cerr << "[Vst3Instrument] setActive failed" << std::endl;
return false;
}
processor->setProcessing(true);
// Count output channels of bus 0 (mono plugins duplicate ch0 → both outs).
int32 outChannels = 2;
if (component->getBusCount(kAudio, kOutput) > 0) {
@@ -848,6 +849,14 @@ void Vst3Instrument::processAudioBlock(float* outputL, float* outputR, uint32_t
std::memset(ob.channelBuffers32[c], 0, numSamples * sizeof(float));
}
}
if (s->processData.numInputs > 0) {
for (int32 b = 0; b < s->processData.numInputs; ++b) {
const Steinberg::Vst::AudioBusBuffers& ib = s->processData.inputs[b];
for (int32 c = 0; c < ib.numChannels; ++c)
if (ib.channelBuffers32[c])
std::memset(ib.channelBuffers32[c], 0, numSamples * sizeof(float));
}
}
tresult pr = processor->process(s->processData);
float mx = 0.f;
if (pr >= 0 && s->processData.numOutputs > 0) {