diff --git a/app/static/js/app.jsx b/app/static/js/app.jsx
index 923a6a7..8b04168 100644
--- a/app/static/js/app.jsx
+++ b/app/static/js/app.jsx
@@ -386,6 +386,10 @@ let _fxRtFreezeTimer = null;
let _fxRtFreezeTries = 0;
let _fxRtSeekFreeze = false;
let _fxRtSeekFreezeTimer = null;
+// M21 ph-diag (Bug C): playhead nhay khi PWR master FX toggle. _phDiagArmedUntil
+// (ms epoch) mo cua so log khi __phArmPwr duoc goi; _phArmed kiem tra hieu luc.
+let _phDiagArmedUntil = 0;
+const _phArmed = () => Date.now() < _phDiagArmedUntil;
const _nativeTrackUrls = {};
const _nativeTrackPending = {};
// ── MIDI overlap cleanup + polyphony gain (spec midi_polyphony_loudness) ─
@@ -2551,11 +2555,15 @@ const FX_RT_START_EST_MS = 450;
// (moi play/resume path deu goi); cold start (chua active) -> null -> WS message
// dau tien anchor.
function fxRtAnchorProcessed() {
+ const _phPrevAnchor = (fxRt && fxRt.processedAnchor);
if (fxRt && fxRt.active && typeof fxRt.processedSamples === 'number') {
fxRt.processedAnchor = fxRt.processedSamples;
} else {
fxRt.processedAnchor = null;
}
+ try {
+ if (_phArmed()) _dbgLog('ph_anchor', 'prevA=' + (typeof _phPrevAnchor === 'number' ? _phPrevAnchor : 'na') + ' ps=' + (typeof fxRt.processedSamples === 'number' ? fxRt.processedSamples : 'na') + ' pa=' + (typeof fxRt.processedAnchor === 'number' ? fxRt.processedAnchor : 'na') + ' act=' + (fxRt && fxRt.active ? 1 : 0));
+ } catch (e) {}
}
function fxRtApplyPdc() {
@@ -3679,6 +3687,7 @@ const MasterStripConsole = ({ masterVolume, setMasterVolume, masterVolL, setMast
id: "powerBtn",
className: "btn-daw h-[18px] rounded text-xs transition-all" + (isMasterActive ? " btn-teal-active" : ""),
onClick: function() {
+ try { if (window.__phArmPwr) window.__phArmPwr(isMasterActive ? 'off' : 'on'); } catch (e) {}
if (setMasteringSettings) {
setMasteringSettings(function(prev) { return Object.assign({}, prev, { masterConnected: !prev.masterConnected, isBypassed: false }); });
}
@@ -15684,7 +15693,7 @@ const addMasterVst = (path) => { const fx = (masterFxList || []).find(f => f.pat
Target LUFS:
-11.0 LUFS
-