fix(v9): 5 bugs — GUI deferred until VST loaded (no white window), fixed retry 8x500ms, VST3 folder resolve for auto-load, sustain-CC64 dropped after STOP, taskkill process tree on exit, Synth+GUI same row in TCP
This commit is contained in:
@@ -306,6 +306,11 @@ int main(int argc, char* argv[]) {
|
||||
inst->noteOff(evt.channel, evt.pitch, 0);
|
||||
break;
|
||||
case 0xB: // CC: controller number in pitch, value in data2
|
||||
// V9 bug 4: sau STOP, drop sustain-down (CC64>0) — JS co the
|
||||
// gui CC64 xuong sau STOP (note-on/CC timer tre); VSTi giu
|
||||
// note khi pedal down -> am treo loop. CC64=0 (sustain-up)
|
||||
// van cho qua.
|
||||
if (transportStopped && evt.pitch == 64 && evt.data2 > 0) return;
|
||||
inst->controlChange(evt.channel, evt.pitch, evt.data2);
|
||||
break;
|
||||
case 0xC: // program change: program in data2
|
||||
@@ -418,6 +423,17 @@ int main(int argc, char* argv[]) {
|
||||
} else if (c.type == 4) { // OPEN_GUI (A7): arg1 = parent HWND (0 → bridge tự tạo native window), arg2 = plugin id
|
||||
uint32_t guiCh = c.channel;
|
||||
if (guiCh >= 16) guiCh = 0;
|
||||
// V9 bug 3/6/7: gate tren MAIN thread TRUOC khi tao window —
|
||||
// instrument load ASYNC (worker thread); OPEN_GUI som -> attach
|
||||
// job fail -> cua so trang van con song. Chua load xong =>
|
||||
// defer: KHONG tao window, KHONG post job. JS retry
|
||||
// openNativeGUI 8x500ms; khi assign xong nhay lai day, tao
|
||||
// window 1 lan va attach OK.
|
||||
if (!instruments.get(guiCh)) {
|
||||
std::cerr << "[NativeBridge] GUI deferred ch=" << guiCh
|
||||
<< " plugin=" << c.arg2 << " (no instrument yet)" << std::endl;
|
||||
continue;
|
||||
}
|
||||
if (!workers[guiCh]) workers[guiCh] = std::make_unique<ChannelWorker>();
|
||||
void* hwnd = (void*)(uintptr_t)c.arg1;
|
||||
#ifdef _WIN32
|
||||
|
||||
Reference in New Issue
Block a user