fix(export): offline export nhan MIDI-only tracks qua midi cache - filter khong loai track khong co buffer

This commit is contained in:
2026-08-24 18:51:14 +07:00
parent 43b68200aa
commit 8639529ecd
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -28023,12 +28023,12 @@ const App = () => {
}
exportTracks = [{ ...selTrack, buffer: clipBuf, startTime: 0, clips: [{ id: 'export_clip', buffer: clipBuf, startTime: 0, name: selTrack.name }] }];
} else if (src === 'track_mix') {
const sel = tracks.filter(t => t.buffer && !t.muted);
const sel = tracks.filter(t => !t.muted && (t.buffer || (t.midiItems && t.midiItems.length > 0)));
const selTrk = selectedTrackId ? sel.filter(t => t.id === selectedTrackId) : sel;
if (selTrk.length === 0) { showToast("Track được chọn không có dữ liệu.", "warning"); return; }
exportTracks = selTrk;
} else {
exportTracks = tracks.filter(t => t.buffer && !t.muted);
exportTracks = tracks.filter(t => !t.muted && (t.buffer || (t.midiItems && t.midiItems.length > 0)));
}
if (exportTracks.length === 0) {
showToast("Không tìm thấy dữ liệu âm thanh hợp lệ để xuất.", "warning");