Siavash Sameni
|
9e7fea7633
|
test: P2-T1-S5 long-session regression — 60s call with drift/loss assertions
3 tests in crates/wzp-client/tests/long_session.rs:
1. long_session_no_drift — 3000 frames (60s) through full encoder/decoder
pipeline, asserts >95% decoded, 0 overruns, 0 underruns
2. long_session_with_simulated_loss — drops every 20th packet + reorders,
asserts >90% decoded, confirms PLC fills gaps (2999/3000)
3. long_session_stats_consistency — verifies stats.total_decoded matches
actual decoded count over 60s (no accounting drift)
Completes P2-T1-S5. Phase 2 is now fully done.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-03-28 20:59:27 +04:00 |
|
Siavash Sameni
|
79f9ff1596
|
feat: Phase 3 — crypto handshake, codec2, benchmarks, audio I/O, relay forwarding
E2E crypto handshake:
- Client/relay handshake via SignalMessage (CallOffer/CallAnswer)
- X25519 ephemeral key exchange with Ed25519 identity signatures
- Integration tests proving bidirectional encrypt/decrypt
Codec2 integration:
- Pure Rust codec2 crate (v0.3) — no C bindings needed
- MODE_3200 (160 samples/20ms, 8 bytes) and MODE_1200 (320 samples/40ms, 6 bytes)
- 11 new tests including encode/decode roundtrip and adaptive switching
Relay forwarding:
- Bidirectional client → remote forwarding with pipeline processing
- CLI args: --listen, --remote
- Periodic stats logging, clean shutdown via tokio::select!
Benchmark tool (wzp-bench):
- Codec roundtrip, FEC recovery, crypto throughput, full pipeline benchmarks
- Sine wave PCM generator for realistic testing
Audio I/O (cpal):
- AudioCapture (microphone) and AudioPlayback (speakers) at 48kHz mono
- CLI --live mode: mic → encode → send / recv → decode → speakers
120 tests passing, 0 failures.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-03-27 13:43:22 +04:00 |
|