FIX: Piano roll tab không xuất âm thanh qua mastering chain được recovery
This commit is contained in:
+10
-1
@@ -680,6 +680,11 @@ function initMasterBus(ctx) {
|
||||
// masteringSettings effect for subsequent changes — see useEffect).
|
||||
if (window.currentMasteringSettings) {
|
||||
try {
|
||||
// Reset sig-cache: chain MỚI (biquad/maximizer node mới) giữ giá trị
|
||||
// INIT (gain 0, width 100…) — applyMasteringSettings early-return vì
|
||||
// _lastMasteringSig không đổi (module-level, persist qua recreation) →
|
||||
// chain FLAT ("spectrum hiển thị nhưng không xử lí âm thanh").
|
||||
_lastMasteringSig = null;
|
||||
toggleMasteringOnMaster(window.currentMasteringSettings.masterConnected, window.currentMasteringSettings.isBypassed);
|
||||
applyMasteringSettings(window.currentMasteringSettings);
|
||||
} catch (e) {
|
||||
@@ -17813,7 +17818,11 @@ const App = () => {
|
||||
for (let i = 0; i < f.length; i++) { if (!isFinite(f[i])) { nanOut = true; break; } }
|
||||
} catch (e) {}
|
||||
}
|
||||
if (pk < 0.001 || (isPianoRoll && nanOut)) {
|
||||
// PIANO_ROLL: CHỈ rebuild khi output NaN (chain chết — state-bad).
|
||||
// pk<0.001 (im lặng) KHÔNG trigger cho piano roll — rests tự nhiên
|
||||
// giữa các note > 750ms là BÌNH THƯỜNG → false-positive = recovery
|
||||
// hủy play + restart notes (glitch) — đúng chuỗi log recovery trước.
|
||||
if ((isPianoRoll ? nanOut : (pk < 0.001 || nanOut))) {
|
||||
masterSilenceFramesRef.current++;
|
||||
const sinceRebuild = performance.now() - (lastMasterRebuildTimeRef.current || 0);
|
||||
if (masterSilenceFramesRef.current > 45 && sinceRebuild > 3000) {
|
||||
|
||||
Reference in New Issue
Block a user