fix(masterfx): merge captured preset vao realtime chain
This commit is contained in:
+10
-2
@@ -1642,7 +1642,12 @@ function fxRtChain() {
|
||||
const ms = window.currentMasteringSettings;
|
||||
if (!ms || !ms.masterConnected || ms.isBypassed) return [];
|
||||
// Chain hợp nhất (builtin + vst3 theo UI order) — mọi slot active gửi bridge.
|
||||
return (ms.chain || []).filter(s => s && s.active !== false && (s.type !== 'vst3' || (!ms.vstBypass && s.path && !s.bypass)));
|
||||
// preset_b64: merge preset GUI mới nhất (_capturedPresetByPath) — nếu chỉ dùng
|
||||
// s.preset_b64 thì preset vừa chỉnh trong GUI chưa kịp persist → bridge load
|
||||
// default (passthrough) → power ON nghe như OFF. Merge ở đây làm chainKey đổi
|
||||
// → fxRtStart tự restart session với preset thật.
|
||||
return (ms.chain || []).filter(s => s && s.active !== false && (s.type !== 'vst3' || (!ms.vstBypass && s.path && !s.bypass)))
|
||||
.map(s => s.type === 'vst3' && _capturedPresetByPath[s.path] ? { ...s, preset_b64: _capturedPresetByPath[s.path] } : s);
|
||||
}
|
||||
// Param master chain entry → C++ BuiltinFx key (mirror Python _BUILTIN_PARAM_MAP).
|
||||
const FX_RT_PARAM_MAP = {
|
||||
@@ -1863,7 +1868,10 @@ function fxRtTrackChain(track) {
|
||||
if (!chain.some(s => s && s.type === 'vst3') && !track.vstFxBypass) {
|
||||
chain = chain.concat(activeVstChain(track.vstFxChain || []));
|
||||
}
|
||||
return chain;
|
||||
// preset_b64: merge preset GUI mới nhất (giống fxRtChain master) — nếu chỉ
|
||||
// dùng s.preset_b64 thì preset chỉnh trong GUI chưa kịp persist → bridge load
|
||||
// default (passthrough). chainKey đổi → fxRtTrackStart tự restart session.
|
||||
return chain.map(s => s.type === 'vst3' && _capturedPresetByPath[s.path] ? { ...s, preset_b64: _capturedPresetByPath[s.path] } : s);
|
||||
}
|
||||
function fxRtTrackChainKey(chain) {
|
||||
return (chain || []).map(s => (s.type || '') + ':' + (s.type === 'vst3' ? (s.path || '') + '#' + ((s.preset_b64 || '').slice(0, 16)) : (s.type || ''))).join('|');
|
||||
|
||||
Reference in New Issue
Block a user