V45.7: fix SF2 load fail fallback — catch bridgeLoad 404 so GM fallback runs

This commit is contained in:
2026-08-29 22:04:37 +07:00
parent 945e63918d
commit c0fbf29d41
3 changed files with 7 additions and 5 deletions
+3 -1
View File
@@ -7398,7 +7398,9 @@ const loadAnyTrackToBridge = async (track) => {
const s0 = ((pl && pl.soundfonts) || []).find(s => String(s.id).replace('sf_', '') === sfId);
bpath = s0 && (s0.file || s0.path);
} catch (e) {}
let r = await window.SonicAPI.bridgeLoad({ name: inst, path: bpath || null, instrumentType: 'SF2', channel: bch });
let r = null;
try { r = await window.SonicAPI.bridgeLoad({ name: inst, path: bpath || null, instrumentType: 'SF2', channel: bch }); }
catch (e) { console.warn('[Bridge] SF2 bridgeLoad fail (fallback):', inst, e); }
let p = r && r.path ? r.path : null;
if (!p) {
// FALLBACK: soundfont id KHÔNG tồn tại trong thư viện (AI prompt mặc