Skip to main content

Module constants

Module constants 

Source
Expand description

Crate-wide constants and small helpers

Constants§

MAX_FRAME_SAMPLES_48KHZ
Maximum samples per channel in a single Opus frame at 48 kHz.
MAX_PACKET_DURATION_MS
Maximum packet duration in milliseconds.

Functions§

is_frame_size_2_5ms_aligned
Returns true when frame_size is a multiple of 2.5 ms at sample_rate.
max_frame_samples_for
Compute the maximum samples per channel for a frame at the given sample_rate.
samples_per_2_5ms
Number of samples per channel in a 2.5 ms frame at the given sample_rate.