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
This commit is contained in:
@@ -79,7 +79,7 @@ cmake -S $NB_DIR -B $BUILD_DIR -G $VS_GEN -A $VS_ARCH `
|
||||
-DCMAKE_BUILD_TYPE=Release `
|
||||
-DVCPKG_TARGET_TRIPLET=x64-windows
|
||||
if ($LASTEXITCODE -ne 0) { Write-Host "ERROR: cmake configure failed" -ForegroundColor Red; exit 1 }
|
||||
cmake --build $BUILD_DIR --config Release --target daw_vst_bridge -- /m
|
||||
cmake --build $BUILD_DIR --config Release --target daw_vst_bridge fx_vst_bridge -- /m
|
||||
if ($LASTEXITCODE -ne 0) { Write-Host "ERROR: cmake build failed" -ForegroundColor Red; exit 1 }
|
||||
|
||||
# 6. Copy sidecar to Tauri externalBin location
|
||||
@@ -89,9 +89,13 @@ New-Item -ItemType Directory -Force $BIN_DIR | Out-Null
|
||||
$EXE = Join-Path $BUILD_DIR "Release\daw_vst_bridge.exe"
|
||||
if (-not (Test-Path $EXE)) { Write-Host "ERROR: $EXE not found" -ForegroundColor Red; exit 1 }
|
||||
Copy-Item $EXE (Join-Path $BIN_DIR "daw_vst_bridge-x86_64-pc-windows-msvc.exe") -Force
|
||||
# fx_vst_bridge: VST FX host sidecar (split — see CMakeLists.txt)
|
||||
$FX_EXE = Join-Path $BUILD_DIR "Release\fx_vst_bridge.exe"
|
||||
if (-not (Test-Path $FX_EXE)) { Write-Host "ERROR: $FX_EXE not found" -ForegroundColor Red; exit 1 }
|
||||
Copy-Item $FX_EXE (Join-Path $BIN_DIR "fx_vst_bridge-x86_64-pc-windows-msvc.exe") -Force
|
||||
|
||||
# 7. Copy fluidsynth runtime DLL next to sidecar (Tauri externalBin bundles only the exe)
|
||||
Write-Host "== [7/7] Copy libfluidsynth-3.dll =="
|
||||
# 7. Copy runtime DLLs next to sidecar (Tauri externalBin bundles only the exe)
|
||||
Write-Host "== [7/7] Copy runtime DLLs (fluidsynth + jpeg) =="
|
||||
$FS_DLL = Join-Path $BUILD_DIR "vcpkg_installed\x64-windows\bin\libfluidsynth-3.dll"
|
||||
if (-not (Test-Path $FS_DLL)) { $FS_DLL = Join-Path $VCPKG_ROOT "installed\x64-windows\bin\libfluidsynth-3.dll" }
|
||||
if (Test-Path $FS_DLL) {
|
||||
@@ -101,4 +105,15 @@ if (Test-Path $FS_DLL) {
|
||||
} else {
|
||||
Write-Host "WARN: libfluidsynth-3.dll not found - bridge needs it at runtime" -ForegroundColor Yellow
|
||||
}
|
||||
# jpeg62.dll (VST3 hosting image decode; vcpkg libjpeg-turbo) - same candidates as fluidsynth
|
||||
$JPEG_DLL = Join-Path $NB_DIR "vcpkg_installed\x64-windows\bin\jpeg62.dll"
|
||||
if (-not (Test-Path $JPEG_DLL)) { $JPEG_DLL = Join-Path $BUILD_DIR "vcpkg_installed\x64-windows\bin\jpeg62.dll" }
|
||||
if (-not (Test-Path $JPEG_DLL)) { $JPEG_DLL = Join-Path $VCPKG_ROOT "packages\libjpeg-turbo_x64-windows\bin\jpeg62.dll" }
|
||||
if (Test-Path $JPEG_DLL) {
|
||||
Copy-Item $JPEG_DLL (Join-Path $BIN_DIR "jpeg62.dll") -Force
|
||||
Copy-Item $JPEG_DLL (Join-Path $BUILD_DIR "Release\jpeg62.dll") -Force
|
||||
Write-Host " jpeg62.dll copied to src-tauri\binaries"
|
||||
} else {
|
||||
Write-Host "WARN: jpeg62.dll not found - VST3 GUIs may fail to show images" -ForegroundColor Yellow
|
||||
}
|
||||
Write-Host "== DONE: sidecar + DLL in src-tauri\binaries =="
|
||||
|
||||
@@ -57,8 +57,8 @@ if ($LASTEXITCODE -ne 0) { Write-Host "ERROR: bridge sidecar missing" -Foregroun
|
||||
npm install -D @tauri-apps/cli
|
||||
# Frontend host: copy template -> src-tauri/ui/index.html (giu Tauri context,
|
||||
# document.write UI engine; neu thieu -> window mat __TAURI__ -> bridge chet).
|
||||
Copy-Item buildscriptsfrontend_host_index.html src-tauriuiindex.html -Force
|
||||
if (-not (Test-Path src-tauriuiindex.html)) { Write-Host "ERROR: frontend host missing" -ForegroundColor Red; exit 1 }
|
||||
Copy-Item build\scripts\index.html src-tauri\ui\index.html -Force
|
||||
if (-not (Test-Path src-tauri\ui\index.html)) { Write-Host "ERROR: frontend host missing" -ForegroundColor Red; exit 1 }
|
||||
npx tauri build
|
||||
|
||||
Write-Host ""
|
||||
|
||||
Reference in New Issue
Block a user