V25: fix wobble khi play - re-buffer FILL sau flush (het loop underrun-flush)
This commit is contained in:
@@ -167,8 +167,10 @@ class SfFxRealtimeProcessor extends AudioWorkletProcessor {
|
||||
}
|
||||
}
|
||||
// Không phát: resume khi đủ block (lần đầu chờ FILL; sau đó chỉ cần 1
|
||||
// block — hold che khoảng chờ).
|
||||
if (this.outQueue.length >= (this.hasStarted ? 1 : this.FILL)) {
|
||||
// block — hold che khoảng chờ). V25: sau flush (resumeFadeIn=true) chờ
|
||||
// re-buffer đủ FILL mới resume — chặn loop underrun→flush→resume-1-block
|
||||
// →underrun (wobble): 1 block phát hết ~5ms → cạn → flush lại.
|
||||
if (this.outQueue.length >= (this.hasStarted && !this.resumeFadeIn ? 1 : this.FILL)) {
|
||||
// V24: interruption (underrun sau stall) — backlog trong queue là audio
|
||||
// LẠC HẬU (chơi lại → lag cộng dồn ~1s). KHÔNG chơi backlog: clear
|
||||
// queue + báo main thread flush (engine xóa input/output ring, main
|
||||
|
||||
Reference in New Issue
Block a user