f348574bc1f377ef80773de9e5d15fcce3034e8b
Sleep-paced threads stall for hundreds of milliseconds when iOS coalesces a backgrounded app's wakeups, and the deadline resets that discarded the deficit left the capture backlog queued until its ring overflowed: regular dropouts that worsen the longer the app stays backgrounded. Pace both 20 ms hands-offs from the AVAudioSourceNode render callback instead (mix via Audio.RunCycle with deviceClockedAudio, capture handoff from the ring), wake the UDP sender on a queue signal instead of a 1 ms poll, and let stalled consumers drop their backlog to the buffer target instead of ratcheting it.
VoiceCat
VoiceCat is a self-hosted, channel-based voice and text chat system built on .NET 10. It uses TLS 1.3 for protobuf control traffic and authenticated encrypted UDP for Opus media. There is no WebRTC, central directory, or plaintext mode.
The repository contains a managed server, CLI, shared client/audio core, and native Windows, macOS, and iOS user interfaces. A small C library supplies Opus/RNNoise, and a small Swift iOS extension captures ReplayKit application audio.
Build
./scripts/build-native.ps1
dotnet restore VoiceCat.slnx --locked-mode
dotnet build VoiceCat.slnx -c Release --no-restore
dotnet test VoiceCat.slnx -c Release --no-build
See CLAUDE.md for the developer map, docs/README.md for current contracts, and PROGRESS.md for the short release handoff.
Layout
proto/ protobuf wire schema
src/ managed protocol, crypto, server, client, audio, and CLI
tests/ managed behavior and integration tests
clients/windows/ WinForms client
clients/apple/ AppKit and UIKit clients
native/media/ narrow Opus/RNNoise C shim
native/rnnoise/ vendored RNNoise source and model
native/apple/broadcast/ ReplayKit broadcast extension
docs/ current contracts and operating documentation
Non-negotiable constraints
- Encryption is mandatory.
- No GPL or LGPL dependencies.
- Real-time audio callbacks never allocate, lock, block, or perform I/O.
- Accessibility is a release requirement on every client platform.
Languages
C++
43.9%
Swift
30.6%
C#
17.5%
Shell
3.6%
CMake
2.1%
Other
2.3%