Some checks failed
build / build (push) Has been cancelled
0.4.10 still played at ~2-5 fps even though the decoder buffer was preallocated. Root cause: the single-slot staging buffer was paced by SourceDataLine backpressure at the audio buffer's granularity (~0.5 s), so the decoder burst-produced ~12 video frames into the slot while audio drained, the consumer saw only the last frame of each burst, then the decoder stalled until audio drained again. Net visible rate ~ source_fps / frames_per_burst. Fix: - Replace single staging slot with a 4-slot ring (preallocated, FIFO). Decoder writes to ringTail; if full, overwrites oldest and bumps droppedFrames so we can see overflow in the log. Render thread drains oldest under the same lock — no allocation, no race. - Shrink audio driver buffer 0.5 s → 0.1 s so the decoder is paced more tightly. Burst size collapses from ~12 frames to 2-3, which fits inside the ring. - Log decoder spec on start (WxH @ fps, audio Hz x ch, ring depth) and produced/consumed/dropped counters every ~10 s. Lets the user log confirm whether the decoder is keeping real-time pace and whether the ring is overflowing. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
457 B
457 B