FIX: Piano roll tab không xuất âm thanh qua mastering chain được recovery

This commit is contained in:
2026-08-05 15:05:44 +07:00
parent d37f4e7557
commit 35f7c3822f
3 changed files with 12 additions and 2 deletions
+4 -1
View File
@@ -17825,7 +17825,10 @@ const App = () => {
if ((isPianoRoll ? nanOut : (pk < 0.001 || nanOut))) {
masterSilenceFramesRef.current++;
const sinceRebuild = performance.now() - (lastMasterRebuildTimeRef.current || 0);
if (masterSilenceFramesRef.current > 45 && sinceRebuild > 3000) {
// NaN = chain CHT chc chn rebuild NGAY (3 frame 50ms).
// pk<0.001 (im lng nghi ng main) gi 45 frame (750ms) đ loi
// transient gap false-positive. Cooldown 3000 chng rebuild-loop.
if (masterSilenceFramesRef.current > (nanOut ? 3 : 45) && sinceRebuild > 3000) {
masterSilenceFramesRef.current = 0;
lastMasterRebuildTimeRef.current = performance.now();
console.warn('[Recovery] Master silent while sources active — rebuilding audio graph');