G3.1: dedicated bridge heartbeat — watchdog liveness independent of audio loop

This commit is contained in:
2026-08-16 10:04:16 +07:00
parent b59e416566
commit 30fa98a441
6 changed files with 186 additions and 31 deletions
+11
View File
@@ -657,6 +657,17 @@ int main(int argc, char* argv[]) {
if (!shmIPC) return 1;
#endif
// G3.1: dedicated heartbeat thread, independent of the audio loop.
// Increments every 100ms (~10Hz). Tauri watchdog keys liveness on this.
// Started right after the SHM map so a slow instrument restore at
// startup (or after watchdog respawn) never looks like a dead bridge.
std::thread([shmIPC]() {
for (;;) {
Sleep(100);
shmIPC->heartbeat++;
}
}).detach();
InstrumentEngineManager instruments;
#ifdef _WIN32
g_engine = &instruments;