fix: MIDI keyboard preview silent after transport STOP — live flag bypass guard (V8)

This commit is contained in:
2026-08-16 15:43:23 +07:00
parent 2d63774474
commit b6950d6418
11 changed files with 1450 additions and 1448 deletions
@@ -110,7 +110,7 @@
* velocity 0..1; sampleOffset in samples within the current audio block.
* data2/data3 (A12): CC value / program / PB LSB|MSB.
*/
dispatchMidiEvent: function (cmd, channel, pitch, velocity, sampleOffset, data2, data3) {
dispatchMidiEvent: function (cmd, channel, pitch, velocity, sampleOffset, data2, data3, live) {
if (!this._tauri()) return false;
var safeVelocity = Math.floor(Math.min(1.0, Math.max(0.0, velocity)) * 127);
var byteCmd;
@@ -127,7 +127,8 @@
velocity: safeVelocity,
data2: data2 === undefined ? 0 : data2,
data3: data3 === undefined ? 0 : data3,
sampleOffset: sampleOffset || 0
sampleOffset: sampleOffset || 0,
live: !!live
}).catch(function (e) { console.warn('[BridgeService] push_midi_event:', e); });
return true;
},
+1 -1
View File
@@ -54,7 +54,7 @@
if (typeof ch === 'string') ch = this.allocateChannel(ch, opts.percussion);
if (ch === undefined || ch === null) ch = 0;
if (this.isBridgeActive()) {
window.NativeBridgeService.dispatchMidiEvent(cmd, ch, pitch, vel, sampleOffset, opts.data2, opts.data3);
window.NativeBridgeService.dispatchMidiEvent(cmd, ch, pitch, vel, sampleOffset, opts.data2, opts.data3, opts.live);
return;
}
if (this.onFallback) this.onFallback(cmd, ch, pitch, vel);