/** The own transport's datagram (GRYT-1818): version u8, flags u8, seq u16, timestamp u32 (48 kHz samples), then one Opus packet. The SFU prefixes the sender id from the session, never the packet. */ export declare const PACKET_VERSION = 1; export declare const HEADER_BYTES = 8; /** Opus's own maximum; anything longer is dropped unread. */ export declare const MAX_OPUS_BYTES = 1275; /** The SFU's prefix on a forwarded packet: the sender's u32 id. */ export declare const SENDER_BYTES = 4; export declare const FLAG_SPEAKING = 1; /** The payload is a round-trip probe (probe.ts), not Opus (GRYT-1836). */ export declare const FLAG_PROBE = 2; export interface AudioPacket { flags: number; seq: number; timestamp: number; opus: Uint8Array; } export declare function writePacket(p: AudioPacket): Uint8Array; /** Null for anything that isn't a packet this version wrote: wrong version, too short, too long. */ export declare function readPacket(bytes: Uint8Array): AudioPacket | null; /** A forwarded packet: the SFU's sender id, then the packet as the sender wrote it. */ export declare function readForwarded(bytes: Uint8Array): { sender: number; packet: AudioPacket; } | null; /** How far `b` is past `a` in a wrapping u16 sequence, -32768..32767. */ export declare function seqDelta(a: number, b: number): number;