/** Bounded reorder buffer for GAP audio frames. */ /** One frame held by {@link JitterBuffer}. */ export interface AudioFrame { mediaSourceId: number; rtpSequence: number; plaintext: Buffer; } /** Outcome of {@link JitterBuffer.push}. */ export type JitterPushOutcome = "accepted" | "late" | "evicted"; /** Result returned by {@link JitterBuffer.push}. */ export interface JitterPushResult { outcome: JitterPushOutcome; evicted?: AudioFrame; } /** * Bounded reorder window keyed by `mediaSourceId`. Holds incoming GAP * frames briefly so the decoder consumes them in `rtpSequence` order; * drops anything older than the next-expected sequence as late. */ export declare class JitterBuffer { private readonly capacityPerSource; private readonly sources; constructor(capacityPerSource: number); /** Insert a frame into the buffer. */ push(frame: AudioFrame): JitterPushResult; /** Pop the next frame if its `rtpSequence` is contiguous; otherwise `null`. */ popInOrder(mediaSourceId: number): AudioFrame | null; /** Pop the next frame regardless of contiguity (skip gaps). */ popForce(mediaSourceId: number): AudioFrame | null; /** Number of frames buffered for the given source. */ lengthFor(mediaSourceId: number): number; /** Drops every queued frame. */ clear(): void; } //# sourceMappingURL=jitter.d.ts.map