feat(vst-gui): open VST3 GUI while playing (level 1)
- main.cpp: drop transportStopped defer in handleOpenGui (G0.1 legacy); G0.1b setReloading-before-job + single UiThread (G1.2) block the 2-thread-1-DLL race. GUI opens immediately during PLAY, short mute (~0.1-0.3s first time, hasAttachedOnce_ false so reloadForGUI skips reload); notes already sounding are kept. Reopen after close still reloads (1-3s mute) - level 2 not feasible. - app.jsx: remove !isPlayingRef.current guard before openNativeGUI in loadTrackInstrumentToBridge. - rebuild app.precompiled.js + daw_vst_bridge.exe.
This commit is contained in:
@@ -796,19 +796,14 @@ int main(int argc, char* argv[]) {
|
||||
})) {
|
||||
return;
|
||||
}
|
||||
// G0.1 (BUG_REPORT): mo GUI khi dang PLAY -> attachView chay tren worker
|
||||
// thread trong luc audio loop process() cung DLL (2 thread 1 plugin) ->
|
||||
// Nexus throw (createView/attached) -> GUI khong load + retry spam ->
|
||||
// stall 3s -> watchdog kill bridge -> mat het instrument -> cam. Defer
|
||||
// OPEN_GUI toi khi transport STOP (sweep duoi fulfill khi loaded &&
|
||||
// transportStopped). Khong doi: tranh mat am; user STOP la GUI tu mo.
|
||||
if (!transportStopped) {
|
||||
std::cerr << "[NativeBridge] GUI deferred ch=" << guiCh
|
||||
<< " plugin=" << pluginId << " (transport PLAY) - queued" << std::endl;
|
||||
std::lock_guard<std::mutex> lock(g_pendingGuiMutex);
|
||||
g_pendingGui[guiCh] = { (void*)arg1, pluginId };
|
||||
return;
|
||||
}
|
||||
// G0.1 (historical): mo GUI khi dang PLAY bi defer toi khi STOP vi 2
|
||||
// thread 1 plugin (audio loop process + attach worker) -> Nexus throw.
|
||||
// LEVEL-1 (2026-08-15): bo defer. G0.1b (setReloading tren MAIN thread
|
||||
// truoc job, o duoi) da silence same-path channels va G1.2 (1 UiThread,
|
||||
// audio loop khong pump window messages) chan race 2 thread 1 DLL.
|
||||
// GUI mo ngay khi play; mute ngan (~0.1-0.3s lan dau: hasAttachedOnce_
|
||||
// false nen reloadForGUI khong reload, Vst3Instrument.cpp 688). Note
|
||||
// dang ngan khong mat. Reopen sau khi dong VAN reload (1-3s mute).
|
||||
// G1.2: window + attach chay tren UiThread (1 thread chung, COM STA +
|
||||
// message pump + job queue). Window messages do UiThread pump dispatch —
|
||||
// audio loop khong con PeekMessageW (xoa block pump o main loop).
|
||||
|
||||
Reference in New Issue
Block a user