V12: fix VSTi GUI khong mo lan 2 khi bridge_status thieu loaded_channels
bridge_status (Rust binary cu, chua co V10 field loaded_channels) -> queryStatus fallback khong co loaded_channels -> lc undefined -> silent return 6626 lam GUI chet im lang o click 2. Bo silent return: mo GUI truc tiep tren bch, an toan vi C++ handleOpenGui DEFER khi channel chua co instrument.
This commit is contained in:
+11
-4
@@ -6623,8 +6623,13 @@ const ensureAndOpenVstGui = async (track) => {
|
||||
if (st && Array.isArray(st.loaded_channels)) state = st.loaded_channels;
|
||||
} catch (e) { console.warn('[Bridge] queryStatus refresh fail:', e); }
|
||||
const lc = (state || []).find(x => _bridgeSafeVstPath(x.path, instrumentId));
|
||||
if (!lc) return;
|
||||
if (lc.channel !== bch) {
|
||||
// V12: bridge_status thieu loaded_channels (Rust binary cu chua co V10
|
||||
// field) -> queryStatus fallback khong co loaded_channels -> lc undefined
|
||||
// -> silent return lam GUI chet im lang. Bo return: mo GUI truc tiep tren
|
||||
// bch. An toan vi C++ handleOpenGui DEFER khi channel chua co instrument.
|
||||
if (!lc) {
|
||||
console.warn('[Bridge] V12 fallback: no loaded_channel match for', instrumentId, 'state_len=', (state || []).length, '— trying direct open ch', bch);
|
||||
} else if (lc.channel !== bch) {
|
||||
// Restore trên channel khác → thử LOAD bản vào bch (C++ guard skip nếu
|
||||
// đã có); fail thì mở GUI ngay trên chính channel restore.
|
||||
try {
|
||||
@@ -6635,8 +6640,10 @@ const ensureAndOpenVstGui = async (track) => {
|
||||
bch = lc.channel;
|
||||
}
|
||||
}
|
||||
window.__bridgeLoadedChannels[bch] = true;
|
||||
window.__bridgeLoadedPaths[bch] = lc.path;
|
||||
if (lc) {
|
||||
window.__bridgeLoadedChannels[bch] = true;
|
||||
window.__bridgeLoadedPaths[bch] = lc.path;
|
||||
}
|
||||
}
|
||||
try { await openVstGuiRetry(instrumentId, bch, 20); } catch (e) { console.warn('[Bridge] openNativeGUI fail:', e); }
|
||||
};
|
||||
|
||||
+2081
-2077
File diff suppressed because one or more lines are too long
@@ -50,7 +50,7 @@
|
||||
<script src="/static/js/services/midiExtractor.js?v=202607281052"></script>
|
||||
<script src="/static/js/services/promptTemplateManager.js?v=202607281039"></script>
|
||||
<script src="/static/js/services/undoRedoEngine.js?v=202607290941"></script>
|
||||
<script src="/static/js/app.precompiled.js?v=202608182152" defer></script>
|
||||
<script src="/static/js/app.precompiled.js?v=202608182330" defer></script>
|
||||
<link rel="stylesheet" href="/static/css/styles.css?v=202607271016">
|
||||
<style>
|
||||
:root {
|
||||
|
||||
Reference in New Issue
Block a user