V45.11: fix SF preset wrong after reopen - preload SF2 gui program change (C++ loadSoundFontFile reset bank/program 0 moi lan load, JS khong gui lai) v=202608300815
This commit is contained in:
@@ -7570,6 +7570,13 @@ const preloadTrackInstruments = async (tracks) => {
|
||||
const inst = t.instrumentId || (t.synth_engine && t.synth_engine.plugin_id);
|
||||
if (!inst) continue;
|
||||
try { await loadAnyTrackToBridge(t); } catch (e) {}
|
||||
// V45.11: C++ loadSoundFontFile resets bank/program to 0 on every
|
||||
// load; preload only loads the SF2 file -> after reopen the SF
|
||||
// preset is wrong (bug: muted SF tracks lost their preset).
|
||||
// __ensureBridgeProgram falls back to synth_engine.soundfont_program.
|
||||
if (typeof inst === 'string' && inst.startsWith('sf_')) {
|
||||
try { if (window.__ensureBridgeProgram) window.__ensureBridgeProgram(t.id || t.trackId, undefined, t.synth_engine); } catch (e) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (window.SonicSF && window.SonicSF.selectInstrument) {
|
||||
|
||||
Reference in New Issue
Block a user