Files
SonicForgeStudio/native_bridge/src/main_linux.cpp
T
admin e79dae5d5c phase4: Linux native_bridge build (Docker) — sfizz from source, --render SF2/SFZ
- Dockerfile: build sfizz tu native_bridge/sfizz-src (hoac git clone v1.2.3),
  sed fix sfizz.pc (-llibsfizz -> -lsfizz), cmake bridge voi 3 flag SMTG OFF
  (VSTGUI/plugin/hosting examples) — bridge headless chi can --render.
- CMakeLists: nhanh non-WIN32 build daw_vst_bridge tu main_linux.cpp +
  RenderJob.cpp + NativeInstrumentEngine.cpp (SF2/SF3 + SFZ; VST3/VST2
  hosting Windows-only, guard #ifdef _WIN32). gui_probe/plugin_host/
  seh_channel_test chi build tren Windows.
- RenderJob.cpp: JSON parser (sheredom json.h) khong con phu thuoc
  HAVE_VST3SDK — render SF2/SFZ chay duoc khong can VST3 SDK.
- NativeInstrumentEngine.cpp: guard windows.h/VST3/VST2/Sandbox/SEH.
- main.cpp: g_engine unconditional + guard disable_ime_contexts (_WIN32).
- engine.spec: bo pedalboard collect_dynamic_libs + hidden imports.
- vst_engine/render_engine: DecentSampler -> NotImplementedError + huong
  dan convert .dspreset -> .vstpreset; pianobook fallback synth.
- Verified: WSL Ubuntu 24.04 build OK, bridge Linux --render SF2 ra WAV
  44100 stereo peak 1575; Python tests 115 passed 1 skipped.
- Dockerfile build chua test duoc (may khong co Docker).
2026-08-17 11:46:24 +07:00

23 lines
848 B
C++

// native_bridge/src/main_linux.cpp
// Linux entry point of daw_vst_bridge: offline --render only (Docker).
// The Windows realtime SHM loop / VST3 GUI hosting is Windows-only and is
// not built here. See main.cpp for the full Windows entry.
#include "RenderJob.h"
#include <cstring>
#include <iostream>
#include <string>
int main(int argc, char* argv[]) {
std::string renderJob, renderOut;
for (int i = 1; i < argc; ++i) {
if (std::strcmp(argv[i], "--render") == 0 && i + 1 < argc) renderJob = argv[i + 1];
else if (std::strcmp(argv[i], "--out") == 0 && i + 1 < argc) renderOut = argv[i + 1];
}
if (renderJob.empty() || renderOut.empty()) {
std::cerr << "usage: daw_vst_bridge --render <job.json> --out <clip.wav>" << std::endl;
return 1;
}
return run_render_job(renderJob, renderOut);
}