fix(fx): realtime VST ngắt quãng khi mở MASTERING PANEL + PWR master không ảnh hưởng âm; pacing WS input/output, gate fxRt theo masterConnected, worklet cap 32
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
// native_bridge/src/main_fx.cpp
|
||||
// Entry point of fx_vst_bridge.exe — VST FX host bridge (task: split FX out
|
||||
// of daw_vst_bridge). Windows only. One-shot modes only:
|
||||
// --render-fx <job.json> --in <input.wav> --out <output.wav>
|
||||
// of daw_vst_bridge). Windows only. Modes:
|
||||
// --render-fx <job.json> --in <input.wav> --out <output.wav> (offline)
|
||||
// --realtime-fx <job.json> --shm <name> [--parent <pid>] (SHM realtime)
|
||||
// --scan <dir>
|
||||
// --open-fx-gui <job.json>
|
||||
// --fx-gui <job.json>
|
||||
// No SHM realtime loop: the realtime master FX chain (control type 6) stays
|
||||
// in daw_vst_bridge because it processes the live instrument mix in-process.
|
||||
// SHM realtime loop (--realtime-fx): cloud-FX loop cho VST3 trong master FX
|
||||
// chain — browser gửi mix qua engine → SHM input ring → bridge xử lý (cùng
|
||||
// RealtimeFxChain như daw_vst_bridge master chain) → SHM output ring →
|
||||
// engine → browser. Xem FxRealtimeIPC.h + RealtimeFxLoop.cpp.
|
||||
#include "RenderFxJob.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
@@ -113,6 +116,8 @@ int main(int argc, char* argv[]) {
|
||||
std::string scanDir;
|
||||
std::string openFxGuiJob;
|
||||
std::string fxGuiServerJob;
|
||||
std::string realtimeFxJob, realtimeShm;
|
||||
uint32_t realtimeParent = 0;
|
||||
for (int i = 1; i < argc; ++i) {
|
||||
if (std::strcmp(argv[i], "--render-fx") == 0 && i + 1 < argc)
|
||||
renderFxJob = argv[i + 1];
|
||||
@@ -126,6 +131,20 @@ int main(int argc, char* argv[]) {
|
||||
openFxGuiJob = argv[i + 1];
|
||||
else if (std::strcmp(argv[i], "--fx-gui") == 0 && i + 1 < argc)
|
||||
fxGuiServerJob = argv[i + 1];
|
||||
else if (std::strcmp(argv[i], "--realtime-fx") == 0 && i + 1 < argc)
|
||||
realtimeFxJob = argv[i + 1];
|
||||
else if (std::strcmp(argv[i], "--shm") == 0 && i + 1 < argc)
|
||||
realtimeShm = argv[i + 1];
|
||||
else if (std::strcmp(argv[i], "--parent") == 0 && i + 1 < argc)
|
||||
realtimeParent = (uint32_t)std::strtoul(argv[i + 1], nullptr, 10);
|
||||
}
|
||||
if (!realtimeFxJob.empty()) {
|
||||
if (realtimeShm.empty()) {
|
||||
std::cerr << "[RealtimeFxLoop] --realtime-fx requires --shm <name>"
|
||||
<< std::endl;
|
||||
return 1;
|
||||
}
|
||||
return run_realtime_fx_loop(realtimeFxJob, realtimeShm, realtimeParent);
|
||||
}
|
||||
if (!renderFxJob.empty()) {
|
||||
if (renderFxIn.empty() || renderFxOut.empty()) {
|
||||
@@ -141,6 +160,7 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
std::cerr << "fx_vst_bridge: no mode. Usage:\n"
|
||||
" --render-fx <job.json> --in <input.wav> --out <output.wav>\n"
|
||||
" --realtime-fx <job.json> --shm <name> [--parent <pid>]\n"
|
||||
" --scan <dir>\n"
|
||||
" --open-fx-gui <job.json>\n"
|
||||
" --fx-gui <job.json>" << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user