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).
This commit is contained in:
2026-08-17 11:46:24 +07:00
parent efe26e3277
commit e79dae5d5c
10 changed files with 135 additions and 71 deletions
+5 -1
View File
@@ -110,7 +110,7 @@ class ChannelWorker; // fwd — WM_DESTROY posts closeGUI() to the channel work
static void post_close_gui(uint32_t ch, HWND hwnd); // defined after ChannelWorker
static void post_resize_view(uint32_t ch, int w, int h); // defined after ChannelWorker
static InstrumentEngineManager* g_engine = nullptr;
static InstrumentEngineManager* g_engine = nullptr; // declared unconditionally (Linux --render build needs the symbol)
static std::mutex g_guiMutex;
static std::map<uint32_t, void*> g_guiWindows; // channel -> HWND (keep window alive)
static std::map<HWND, uint32_t> g_hwndToCh; // HWND -> channel (WM_DESTROY cleanup)
@@ -1010,7 +1010,9 @@ int main(int argc, char* argv[]) {
// a JUCE_ window + plugin wndproc (ImmIsUIMessageW ->
// SendMessageW WM_IME_SETCONTEXT same hwnd) = infinite
// recursion (0xC00000FD, observed inside attachView).
#ifdef _WIN32
if (ok) disable_ime_contexts((HWND)hwnd);
#endif
if (ok) ok = inst->attachView(hwnd);
} catch (...) {
std::cerr << "[NativeBridge] GUI attach EXCEPTION ch=" << guiCh
@@ -1033,7 +1035,9 @@ int main(int argc, char* argv[]) {
unmute_if_not_closing(y, "openGUI");
if (ok) {
#ifdef _WIN32
disable_ime_contexts((HWND)hwnd);
#endif
std::cout << "[NativeBridge] GUI attached hwnd=" << hwnd
<< " plugin=" << arg2 << " ch=" << guiCh