diff --git a/app/static/js/app.jsx b/app/static/js/app.jsx index 2260aa3..634957e 100644 --- a/app/static/js/app.jsx +++ b/app/static/js/app.jsx @@ -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 CHẾT chắc chắn → rebuild NGAY (3 frame ≈ 50ms). + // pk<0.001 (im lặng nghi ngờ — main) giữ 45 frame (750ms) để loại + // transient gap false-positive. Cooldown 3000 chống 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'); diff --git a/app/templates/index.html b/app/templates/index.html index 9f0fe15..f644f26 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -24,7 +24,7 @@ - +