fix(bridge): set ringMask=7 on Windows — ring collapsed to 1 slot (slot = writeIndex & 0), dropped audio blocks on GUI jank

This commit is contained in:
2026-08-19 11:20:39 +07:00
parent 77360578fd
commit 2bbe80efa3
+4
View File
@@ -717,6 +717,10 @@ int main(int argc, char* argv[]) {
}
auto* shmIPC = (SharedAudioBufferIPC*)MapViewOfFile(hMapFile, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(SharedAudioBufferIPC));
if (!shmIPC) { CloseHandle(hMapFile); return 1; }
// VSTi crackle fix: 8-slot audio ring (see SharedMemoryIPC.h). Must be set
// on Windows too — ringMask stays 0 otherwise and the ring collapses to
// 1 slot (slot = writeIndex & 0), dropping whole blocks on any jank.
shmIPC->ringMask = 7;
#else
(void)shmName; // POSIX shm mapping (shm_open) added when porting off Windows
auto* shmIPC = (SharedAudioBufferIPC*)std::calloc(1, sizeof(SharedAudioBufferIPC));