fix: restore program default 0 for MAIN track MIDI playback

Line 10283 defaulted to undefined when instrumentProgram
undefined, breaking Play for MAIN tracks with MIDI items
but no instrument. Restored: undefined ? instrumentProgram : 0.
Section sub-track (line 10393) keeps undefined -> oscillator
fallback to avoid loading MAIN SoundFont.
This commit is contained in:
2026-07-28 09:25:50 +07:00
parent ea40f0c540
commit 2dec94aa7e
3 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -10280,7 +10280,7 @@ const App = () => {
const noteEndSec = noteStartSec + noteDurSec;
if (offsetTime < noteEndSec) {
const durationMs = noteDurSec * 1000;
const program = track.instrumentProgram;
const program = track.instrumentProgram !== undefined ? track.instrumentProgram : 0;
if (offsetTime < noteStartSec) {
const delay = noteStartSec - offsetTime;
const startTime = context.currentTime + delay;