fix(fx): apply preset_b64 in realtime FX chain (issue 4)
This commit is contained in:
@@ -1051,7 +1051,16 @@ std::shared_ptr<RealtimeFxChain::Impl::Chain> RealtimeFxChain::Impl::buildChain(
|
|||||||
ent.bypass = memberInt(o, "bypass", 0) != 0;
|
ent.bypass = memberInt(o, "bypass", 0) != 0;
|
||||||
if (!ent.bypass) {
|
if (!ent.bypass) {
|
||||||
auto fx = std::make_shared<Vst3Fx>();
|
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 {
|
else {
|
||||||
std::cerr << "[RealtimeFx] load failed — slot bypassed: " << path << std::endl;
|
std::cerr << "[RealtimeFx] load failed — slot bypassed: " << path << std::endl;
|
||||||
ent.bypass = true;
|
ent.bypass = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user