Skip to main content

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 jitter;
11pub mod link;
12pub mod rate;
13pub mod resample;
14pub mod ring;
15pub mod share;
16pub mod stats;
17pub mod wire;
18
19/// Fullband: what the devices run at, so the microphone and speaker paths usually
20/// need no resampling, and Opus keeps everything the microphone heard.
21pub const ENGINE_RATE: u32 = 48_000;
22pub const FRAME_MS: u32 = 20;
23pub const FRAME: usize = (ENGINE_RATE * FRAME_MS / 1000) as usize;
24/// How late the echo may arrive after its far-end reference: device buffers plus room.
25pub const AEC_TAIL_MS: u32 = 200;