pub mod config; pub mod devices; pub mod diagnostics; mod pipeline; mod processing; pub mod sounds; pub use devices::{DeviceEntry, DeviceLists}; pub use diagnostics::{AudioIssue, AudioStage, AudioStats}; pub use pipeline::JitterConfig; pub use pipeline::{AudioPipeline, MediaMixer}; pub use processing::{DenoiseState, TransmitGate, VoiceActivity}; #[derive(Debug, Clone, Copy)] pub struct AudioSync { pub mic_enabled: bool, pub vad_mode: usize, pub vad_threshold: f32, pub input_volume: f32, pub ptt_held: bool, pub output_volume: f32, pub jitter_size: usize, pub adaptive_buffer: bool, pub voice_bitrate_kbps: f32, pub noise_suppress: bool, } #[derive(Debug, Clone)] pub struct PipelineConfig { pub channel_key: u64, /// Persisted microphone id; empty is the system default. pub mic_device_id: String, /// Persisted output device id; empty is the system default. pub output_device_id: String, pub voice_bitrate_kbps: f32, pub packet_interval: usize, } impl PartialEq for PipelineConfig { fn eq(&self, other: &Self) -> bool { self.channel_key == other.channel_key && self.mic_device_id == other.mic_device_id && self.output_device_id == other.output_device_id && self.packet_interval == other.packet_interval } } #[derive(Debug, Clone)] pub struct IncomingVoice { pub voice_seq: u32, pub timestamp: u32, pub channel_id: u64, pub opus_data: Vec, } pub struct EncodedFrame { pub channel_id: u64, pub voice_seq: u32, pub timestamp: u32, pub data: Vec, } pub fn start(cfg: PipelineConfig) -> anyhow::Result { pipeline::start(cfg) }