fix: MIDI preview dừng file cũ khi click file midi khác

This commit is contained in:
2026-08-02 17:18:08 +07:00
parent 1de6bd6b57
commit 7000529d8d
4 changed files with 10 additions and 2 deletions
+3
View File
@@ -9361,6 +9361,9 @@ const MediaExplorerPanel = ({ height }) => {
}
if (rafRef.current) cancelAnimationFrame(rafRef.current);
rafRef.current = null;
if (window.SonicSF && typeof window.SonicSF.stopAll === 'function') {
try { window.SonicSF.stopAll(); } catch (e) {}
}
setIsPlaying(false);
setIsPaused(false);
}, []);