vector_calls/lib.rs
1//! The half of a Vector call that runs anywhere: the wire format, the jitter buffer,
2//! the rate ladder, and the small signal-processing pieces that need no device.
3//! Everything that touches a microphone, a speaker, a codec library or a socket
4//! lives in the client that embeds this crate.
5//!
6//! No clock: every function that reasons about time takes milliseconds in, so the
7//! same code runs under tokio, on a thread, and in a browser.
8
9pub mod declick;
10pub mod gate;
11pub mod jitter;
12pub mod link;
13pub mod rate;
14pub mod resample;
15pub mod ring;
16pub mod share;
17pub mod stats;
18pub mod wire;
19
20/// Fullband: what the devices run at, so the microphone and speaker paths usually
21/// need no resampling, and Opus keeps everything the microphone heard.
22pub const ENGINE_RATE: u32 = 48_000;
23pub const FRAME_MS: u32 = 20;
24pub const FRAME: usize = (ENGINE_RATE * FRAME_MS / 1000) as usize;
25/// How late the echo may arrive after its far-end reference: device buffers plus room.
26pub const AEC_TAIL_MS: u32 = 200;