feat: silent fallback when no instrument — no oscillator default

_playNoteFluid no-instrument branch previously called
_playNoteFallback (sine wave oscillator). Changed to
silent return. User explicitly requested no default sound.
This commit is contained in:
2026-07-28 09:28:21 +07:00
parent 2dec94aa7e
commit 6fa6578dd1
2 changed files with 7 additions and 6 deletions
+1 -6
View File
@@ -393,12 +393,7 @@
_fluidModule._fluid_synth_program_change(_synthPtr, ch, usedProg);
} catch (e) {}
} else {
// No instrument configured: use oscillator fallback directly.
// Do NOT call program_change(ch, 0) — FluidSynth would pick
// program 0 from whatever SoundFont is loaded (could be
// another track's SF), causing cross-track instrument leak.
var ctx = getCtx();
self._playNoteFallback(note, velocity, durationMs, startTime, undefined, null, channel, undefined);
// No instrument configured: silent — no FluidSynth, no oscillator.
return;
}
if (ch === undefined) ch = (usedBank === 128 ? 9 : 0);