Files
SonicForgeStudio/tools/fix_vst2_ext.py
T
admin 7c22ae1f02 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
2026-08-20 09:42:42 +07:00

23 lines
786 B
Python

import io
p = 'app/api/v1/plugins.py'
s = io.open(p, encoding='utf-8', newline='').read()
a = '".vst2" if instrument_type.upper() == "VST2" else'
b = '(".dll", ".so") if instrument_type.upper() == "VST2" else'
assert s.count(a) == 1, s.count(a)
s = s.replace(a, b)
a2 = 'if fn.lower().endswith(ext) and \\'
b2 = 'if (fn.lower().endswith(ext) if isinstance(ext, tuple) else fn.lower().endswith(ext)) and \\'
assert s.count(a2) == 1, s.count(a2)
s = s.replace(a2, b2)
a3 = 'if os.path.isdir(sp) and sub.lower().endswith(ext) and \\'
b3 = 'if os.path.isdir(sp) and (sub.lower().endswith(ext) if isinstance(ext, tuple) else sub.lower().endswith(ext)) and \\'
assert s.count(a3) == 1, s.count(a3)
s = s.replace(a3, b3)
io.open(p, 'w', encoding='utf-8', newline='').write(s)
print('ok')