Expand description
Safe helpers around opus packet inspection and parsing
Functions§
- multistream_
packet_ pad - Pad a multistream packet to
new_lengivennb_streams. - multistream_
packet_ unpad - Remove padding from a multistream packet; returns new length.
- packet_
bandwidth - Get bandwidth from a packet.
- packet_
channels - Get channel count encoded by the packet.
- packet_
frame_ count - Get number of frames in a packet.
- packet_
has_ lbrr - Check if packet has LBRR.
- packet_
pad - Increase a packet’s size by adding padding to reach
new_len. - packet_
parse - Parse packet into frame slices. Returns
(toc, payload_offset, frames). - packet_
parse_ into - Parse a packet into caller-provided frame storage.
- packet_
sample_ count - Get total samples (per channel) in a packet at the given sample rate.
- packet_
samples_ per_ frame - Get the number of samples per frame for a packet at a given sample rate.
- packet_
unpad - Remove padding from a packet; returns new length or error.
- soft_
clip - Apply libopus soft clipping to keep float PCM within [-1, 1].