fix(fx): apply preset_b64 in realtime FX chain (issue 4)

This commit is contained in:
2026-08-19 10:56:21 +07:00
parent 1dfba14114
commit 466b2022f2
+10 -1
View File
@@ -1051,7 +1051,16 @@ std::shared_ptr<RealtimeFxChain::Impl::Chain> RealtimeFxChain::Impl::buildChain(
ent.bypass = memberInt(o, "bypass", 0) != 0;
if (!ent.bypass) {
auto fx = std::make_shared<Vst3Fx>();
if (fx->load(path, sampleRate_, blockSize_)) ent.fx = std::move(fx);
if (fx->load(path, sampleRate_, blockSize_)) {
const std::string preset = memberString(o, "preset_b64", "");
if (!preset.empty()) {
if (fx->applyPreset(preset))
std::cerr << "[RealtimeFx] preset applied: " << path << std::endl;
else
std::cerr << "[RealtimeFx] preset apply FAILED (default kept): " << path << std::endl;
}
ent.fx = std::move(fx);
}
else {
std::cerr << "[RealtimeFx] load failed — slot bypassed: " << path << std::endl;
ent.bypass = true;