FIX: khi ở MAIN SESSION đang play mà mở Piano roll tab thì âm thanh bị tắt

This commit is contained in:
2026-08-04 22:12:50 +07:00
parent 856a8183b6
commit cfc114b9d7
4 changed files with 17 additions and 5 deletions
+5 -2
View File
@@ -15979,8 +15979,11 @@ const App = () => {
const midiItem = (track.midiItems || []).find(m => m.id === midiItemId);
if (!midiItem) return;
// Clean stop any ongoing playback to avoid stuck playheads and audio routes
stopAllPlayback();
// Clean stop playback ONLY khi KHÔNG đang play main nếu main đang play,
// m PIANO ROLL tab KHÔNG đưc dng âm (user: dblclick m tab lúc main
// play âm main phi tiếp tc). Nhánh play sub-tab t stopAllPlayback
// trưc khi play nên không xung đt route.
if (!isPlaying) stopAllPlayback();
const ctx = getAudioContext();
const silentBuffer = ctx.createBuffer(1, 128, ctx.sampleRate);