debug: diag PUSH_MIDI ok/fail cho push_midi_event (nghi midi queue full — bridge khong nhan note trong bounce)

This commit is contained in:
2026-08-25 07:05:41 +07:00
parent f741e1e1f1
commit f8a500c050
2 changed files with 9 additions and 2 deletions
@@ -142,7 +142,14 @@
data3: data3 === undefined ? 0 : data3,
sampleOffset: sampleOffset || 0,
live: !!live
}).catch(function (e) { console.warn('[BridgeService] push_midi_event:', e); });
}).then(function () {
_pushOk = (_pushOk || 0) + 1;
if ((_pushOk + (_pushFail || 0)) % 100 === 0 && window.__sfDiag) window.__sfDiag('PUSH_MIDI ok=' + _pushOk + ' fail=' + (_pushFail || 0));
}).catch(function (e) {
_pushFail = (_pushFail || 0) + 1;
if (_lastPushFail !== String(e)) { _lastPushFail = String(e); if (window.__sfDiag) window.__sfDiag('PUSH_MIDI_FAIL ' + e); }
console.warn('[BridgeService] push_midi_event:', e);
});
return true;
},
+1 -1
View File
@@ -39,7 +39,7 @@
<script src="/static/js/services/storage.js?v=202608038200"></script>
<script src="/static/js/services/soundfontStorage.js?v=202607271016"></script>
<script src="/static/js/services/soundfontPlayer.js?v=202608101800"></script>
<script src="/static/js/services/nativeBridgeService.js?v=202608190001"></script>
<script src="/static/js/services/nativeBridgeService.js?v=202608250107"></script>
<script src="/static/js/services/bridgeAudioNode.js?v=202608250107"></script>
<script src="/static/js/services/unifiedMidiRouter.js?v=202608112200"></script>
<script src="/static/js/services/audioRoutingEngine.js?v=202608250107"></script>