docs: condense implementation comments
This commit is contained in:
@@ -314,6 +314,13 @@ message TextMessage {
|
||||
it before closing the socket. `code = 0` is reserved for client-initiated graceful
|
||||
disconnect; server-sent fatal `Disconnect` uses `code ≥ 1` (1 = protocol error,
|
||||
2 = kicked).
|
||||
- **Client reconnection is local policy.** The core reports transport loss but does not reconnect.
|
||||
The iOS client snapshots the server, channel, voice subscription, mute, and deafen state, then
|
||||
reconnects with exponential backoff capped at 30 seconds. `NWPathMonitor` proactively replaces
|
||||
a live session when the active interface changes or becomes unavailable, avoiding the TCP
|
||||
keepalive delay; same-interface refreshes are ignored. A user-initiated disconnect cancels the
|
||||
retry task and path monitor. After authentication, the client rejoins the prior channel before
|
||||
restoring voice and local mute/deafen state.
|
||||
|
||||
## 8. Client-local features (no protocol changes)
|
||||
|
||||
|
||||
@@ -281,6 +281,21 @@ Each receiver keeps an **adaptive jitter buffer per ssrc** with **bounded-depth
|
||||
and **Advanced** (every knob manual). A2DP output requires an internal-mic preset (the Bluetooth
|
||||
device is output-only); the Stereo/Mono Mic presets fall back to the built-in speaker when no
|
||||
external output is connected (`applyA2dpSpeakerFallback`).
|
||||
- **iOS implementation invariants:**
|
||||
- External playback is enabled before connecting because authentication can start the audio
|
||||
engine before the UI receives another turn.
|
||||
- AVAudioEngine callbacks may contain multiple codec frames. The mic path writes them to an
|
||||
SPSC ring and releases complete 20 ms frames at a steady cadence; it never consumes a partial
|
||||
frame, and the pacer is recreated when mono/stereo capture changes.
|
||||
- `AVAudioSession` setters can synchronously emit route-change notifications. Configuration is
|
||||
re-entrancy guarded, and recovery ignores `.categoryChange`, `.routeConfigurationChange`, and
|
||||
`.override` because those reasons are generated by the app's own routing calls. External route
|
||||
changes and engine-configuration notifications still rebuild the graph.
|
||||
- Stereo capture anchors the built-in mic's stereo data source. It does not call
|
||||
`setPreferredInputNumberOfChannels(2)`, which can disrupt A2DP output; the core receives the
|
||||
channel count through `vc_set_capture_channels`.
|
||||
- The A2DP speaker fallback caches its last output override. Reapplying the same override would
|
||||
emit another `.override` notification and recursively trigger recovery.
|
||||
- **DSP engine: see §11.** The original plan was `webrtc-audio-processing` (AEC + NS + AGC +
|
||||
VAD in one tuned module, BSD-licensed) — but it has no working Windows/MSVC build upstream
|
||||
(confirmed via its own issue tracker: GCC-only Meson build, MinGW support unfinished, hard
|
||||
|
||||
Reference in New Issue
Block a user