fix(midi): _pushEvt -> this._pushEvt — ReferenceError killed pushEvent before PUSH_ROUTE; ?v=202608250054

This commit is contained in:
2026-08-25 07:55:11 +07:00
parent 109a8f5c5b
commit 388da8b380
3 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -56,13 +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__));
this._pushEvt = (this._pushEvt || 0) + 1;
if (this._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._pushEvt % 100 === 0 && window.__sfDiag) window.__sfDiag('PUSH_FALLBACK cmd=' + cmd + ' ch=' + ch);
if (this.onFallback) this.onFallback(cmd, ch, pitch, vel);
},