// 2026년 포트폴리오용 재구성 코드. 실제 업무 당시 소스가 아닙니다. // 2026 portfolio reconstruction. Not original production source. using System; using System.Collections.Generic; namespace PortfolioExamples { // Fixed sample-count delay, not a network jitter buffer or a wall-clock guarantee. public sealed class FrameDelayBuffer { readonly int delay; readonly Queue queue = new Queue(); public FrameDelayBuffer(int delayFrames) { if (delayFrames < 0) throw new ArgumentOutOfRangeException(nameof(delayFrames)); delay = delayFrames; } public bool Push(T value, out T output) { queue.Enqueue(value); if (queue.Count <= delay) { output = default(T); return false; } output = queue.Dequeue(); return true; } public void Reset() => queue.Clear(); public int BufferedCount => queue.Count; } }