From c78d9f2911aeac029a5389879b5ebd41a52ee871 Mon Sep 17 00:00:00 2001 From: locphamtran Date: Thu, 20 Aug 2026 11:11:27 +0700 Subject: [PATCH] bridge: drop 2-instance Qin cap (jBridge per-plugin settings fix) Qin bridges via jBridge shared auxhost; 3rd live instance flooded ML_RELEASE_ERROR (engine per-auxhost capacity, not our code). Fix: write %APPDATA%\jBridge\SettingsFilesFor64BitPlugins\Qin_RV.jBridge with RUN_IN_EXISTING_AUXHOST 0 -> each instance gets own auxhost, unlimited tracks. Remove LOAD REJECT/restore SKIP guards. Verified: 4 Qin ch0/1/2/9 live, 4 auxhost.exe, 0 ML_RELEASE_ERROR, GUI all attach. --- native_bridge/src/main.cpp | 41 -------------------------------------- 1 file changed, 41 deletions(-) diff --git a/native_bridge/src/main.cpp b/native_bridge/src/main.cpp index ded3ba1..b0e3713 100644 --- a/native_bridge/src/main.cpp +++ b/native_bridge/src/main.cpp @@ -1355,26 +1355,6 @@ int main(int argc, char* argv[]) { } if (ok) { if (auto* inst = instruments.get(ch)) { - // QIN LIMIT: same-path VST2 instance #3 would - // flood auxhost with ML_RELEASE_ERROR (engine - // supports 2 live instances max). Restore skips - // it; frontend keeps the track but muted/empty. - if (t == InstrumentType::VST2 && !path.empty()) { - uint32_t samePath = 0; - for (uint32_t y = 0; y < 16; ++y) { - if (y == ch) continue; - if (!instruments.get(y)) continue; - if (lower_plugin_path(y) == lower_path_str(path)) ++samePath; - } - if (samePath >= 2) { - std::cerr << "[NativeBridge] restore SKIP ch=" << ch - << " VST2 path already has " << samePath - << " live instances (" << path - << ") - plugin engine supports 2 max" << std::endl; - instruments.unload(ch); - ok = false; - } - } } if (ok) { auto* inst2 = instruments.get(ch); @@ -1455,27 +1435,6 @@ int main(int argc, char* argv[]) { << " (already loaded: " << path << ")" << std::endl; return; } - // QIN LIMIT: Kong Audio Qin bridges all instances through - // ONE auxhost.exe (32-bit engine host); a 3rd live Qin - // instance makes the engine spam ML_RELEASE_ERROR forever - // (observed: ch0+ch3 fine, +ch2 -> bridge log flooded, - // engine unusable). Reject VST2 instance #3 of the same - // path so the session stays playable. - if (t == InstrumentType::VST2 && !path.empty()) { - uint32_t samePath = 0; - for (uint32_t y = 0; y < 16; ++y) { - if (y == ch) continue; - if (!instruments.get(y)) continue; - if (lower_plugin_path(y) == lower_path_str(path)) ++samePath; - } - if (samePath >= 2) { - std::cerr << "[NativeBridge] LOAD REJECT ch=" << ch - << " VST2 path already has " << samePath - << " live instances (" << path - << ") - plugin engine supports 2 max" << std::endl; - return; - } - } // CRASH FIX: this job enters the plugin DLL (createInstance // in loadPlugin, old-instance terminate on replace) while // the audio loop may process() another instance of the SAME