V43: tang FILL 8->16 chong underrun crackle (cushion 3-8 -> 11-16) + PDC 5888

This commit is contained in:
2026-08-28 16:36:13 +07:00
parent bf74a0be4f
commit 8990f04357
4 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -29,8 +29,8 @@ class SfFxRealtimeProcessor extends AudioWorkletProcessor {
super();
this.BLOCK = 256; // FXRT_BLOCK
this.BURST = 4; // số block gom 1 frame (bridge batch)
this.FILL = 8; // V40: 8 block ~43ms @48k: buffer khởi đầu — hấp thụ jitter main-thread (GUI decode, rAF, VST panel). PDC 3840 = (7+8)*256 (fxRtApplyPdc). Lưu ý: cushion mỏng hơn (24→8) → jitter main-thread mạnh → nguy cơ underrun fade-out.
this.RESUME_FILL = 8; // V26: re-buffer khi resume SAU STOP (flush_for_stop) — 8 block ~43ms (V40: = FILL) → play kế tiếp bắt đầu nhanh; underrun-stall vẫn dùng FILL (crackle/wobble).
this.FILL = 16; // V43: 16 block ~85ms @48k: buffer khởi đầu — hấp thụ jitter main-thread (GUI decode, rAF, VST panel). PDC 5888 = (7+16)*256 (fxRtApplyPdc). V40 giam 24->8 -> cushion = FILL - d ~3-8; pump/WS gap 42ms + queue 3 -> underrun (fx_stats u=1 q=0 trong log). V43 len 16 -> cushion ~11-16, ngang muc q=10-15 sau flush/resume (het underrun trong log).
this.RESUME_FILL = 16; // V26: re-buffer khi resume SAU STOP (flush_for_stop) — 16 block ~85ms (V43: = FILL) → play kế tiếp bắt đầu nhanh; underrun-stall vẫn dùng FILL (crackle/wobble).
this.resumeFill = this.FILL; // mức re-buffer khi resume sau flush — stop: RESUME_FILL, underrun-stall: FILL
this.CAP = 32; // V40: cap queue chặn overflow (~170ms)
this.HOLD_FADE = 4; // 4 block ~21ms: fade 1→0 sau HOLD hết (hết click cắt cứng)