V24: fix master-chain crackle, 1s lag, solo bypass

- worklet: FILL 48->24 (PDC 7936 dung), flush protocol khi resume sau interruption
  (clear queue + fade-in/crossfade chi voi block moi), drop block stale
- engine fx_realtime: _flush_input_locked NO-DROP (ring day -> giu pending, cap 2048),
  flush_all() dong bo in/out khi worklet resume
- app.jsx: WS flush_done + flushing guard, fallback timer 500ms
- plugins.py: xu ly {cmd:flush} -> flush_done
- index.html: bump v param
This commit is contained in:
2026-08-26 20:15:13 +07:00
parent 28a06134f9
commit f38e500326
6 changed files with 148 additions and 31 deletions
+4
View File
@@ -1167,6 +1167,10 @@ async def ws_fx_realtime(websocket: WebSocket, session_id: str):
sess.set_param(cmd.get("slot"), cmd.get("key"), cmd.get("value"))
elif cmd.get("cmd") == "latency":
sess.report_latency(cmd.get("slot"), cmd.get("samples"))
elif cmd.get("cmd") == "flush":
# V24: client resume sau stall — xóa backlog cũ (lag ~1s).
sess.flush_all()
await websocket.send_text(json.dumps({"cmd": "flush_done"}))
continue
data = msg.get("bytes")
if data is None: