diff --git a/crates/wzp-client/src/call.rs b/crates/wzp-client/src/call.rs index 5b13f15..a1418f1 100644 --- a/crates/wzp-client/src/call.rs +++ b/crates/wzp-client/src/call.rs @@ -30,9 +30,9 @@ impl Default for CallConfig { fn default() -> Self { Self { profile: QualityProfile::GOOD, - jitter_target: 50, + jitter_target: 10, jitter_max: 250, - jitter_min: 25, + jitter_min: 3, // 60ms — low latency start, still smooths jitter } } } diff --git a/crates/wzp-client/src/cli.rs b/crates/wzp-client/src/cli.rs index 23c7fd9..af53e43 100644 --- a/crates/wzp-client/src/cli.rs +++ b/crates/wzp-client/src/cli.rs @@ -394,13 +394,19 @@ async fn run_live(transport: Arc) -> anyhow::Resu loop { match recv_transport.recv_media().await { Ok(Some(pkt)) => { + let is_repair = pkt.header.is_repair; decoder.ingest(pkt); - while let Some(_n) = decoder.decode_next(&mut pcm_buf) { - playback.write_frame(&pcm_buf); + // Only decode for source packets (1 source = 1 audio frame). + // Repair packets feed the FEC decoder but don't produce audio. + if !is_repair { + if let Some(_n) = decoder.decode_next(&mut pcm_buf) { + playback.write_frame(&pcm_buf); + } } } Ok(None) => { - tokio::time::sleep(tokio::time::Duration::from_millis(1)).await; + info!("connection closed"); + break; } Err(e) => { error!("recv error: {e}");