debug(midi): diag PUSH_ROUTE/PUSH_ENTER — pin pushEvent->dispatchMidiEvent break point

This commit is contained in:
2026-08-25 07:36:20 +07:00
parent a00c57d44f
commit 60d1eee107
3 changed files with 7 additions and 2 deletions
@@ -124,6 +124,8 @@
* data2/data3 (A12): CC value / program / PB LSB|MSB.
*/
dispatchMidiEvent: function (cmd, channel, pitch, velocity, sampleOffset, data2, data3, live) {
_pushEnter = (_pushEnter || 0) + 1;
if (_pushEnter % 100 === 0 && window.__sfDiag) window.__sfDiag('PUSH_ENTER cmd=' + cmd + ' ch=' + channel + ' tauri=' + !!this._tauri());
if (!this._tauri()) return false;
var safeVelocity = Math.floor(Math.min(1.0, Math.max(0.0, velocity)) * 127);
var byteCmd;
@@ -56,10 +56,13 @@
var sampleOffset = opts.sampleOffset || 0;
if (typeof ch === 'string') ch = this.allocateChannel(ch, opts.percussion);
if (ch === undefined || ch === null) ch = 0;
_pushEvt = (_pushEvt || 0) + 1;
if (_pushEvt % 100 === 0 && window.__sfDiag) window.__sfDiag('PUSH_ROUTE cmd=' + cmd + ' ch=' + ch + ' brAct=' + this.isBridgeActive() + ' nbs=' + !!window.NativeBridgeService + ' tauri=' + !!(window.__TAURI__));
if (this.isBridgeActive()) {
window.NativeBridgeService.dispatchMidiEvent(cmd, ch, pitch, vel, sampleOffset, opts.data2, opts.data3, opts.live);
return;
}
if (_pushEvt % 100 === 0 && window.__sfDiag) window.__sfDiag('PUSH_FALLBACK cmd=' + cmd + ' ch=' + ch);
if (this.onFallback) this.onFallback(cmd, ch, pitch, vel);
},
+2 -2
View File
@@ -39,9 +39,9 @@
<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=202608250108"></script>
<script src="/static/js/services/nativeBridgeService.js?v=202608250112"></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/unifiedMidiRouter.js?v=202608250112"></script>
<script src="/static/js/services/audioRoutingEngine.js?v=202608250107"></script>
<script src="/static/js/services/aiGateway.js?v=202608037200"></script>
<script src="/static/js/services/dawCommandDispatcher.js?v=202607271016"></script>