fix: default instrument for tracks without instrument set

_playNoteFluid: when no synthEngine and no program, fallback to
program 0 on channel (default piano) so unconfigured tracks still
produce sound via FluidSynth
This commit is contained in:
2026-07-27 20:09:49 +07:00
parent 8c5d71c2f0
commit b5344e41f7
@@ -392,6 +392,11 @@
try {
_fluidModule._fluid_synth_program_change(_synthPtr, ch, usedProg);
} catch (e) {}
} else {
if (ch === undefined) ch = 0;
try {
_fluidModule._fluid_synth_program_change(_synthPtr, ch, 0);
} catch (e) {}
}
if (ch === undefined) ch = (usedBank === 128 ? 9 : 0);
var ctx = getCtx();