Cellular Network Stability
This release focuses on fixing critical time synchronization and audio playback issues on cellular (mobile data) networks. WiFi playback was mostly unaffected.
Bug Fixes
-
Fix stale time sync responses contaminating burst measurements — On cellular networks with high latency variance, responses from previous sync bursts would arrive late and contaminate the current burst (e.g., 32 responses received for 15 packets sent, with "best" RTTs of 25 seconds). Added a 10-second RTT ceiling that rejects these stale measurements, allowing the Kalman filter to converge on real network data.
-
Fix MediaCodec decoder race condition —
onStreamStartposts decoder creation to the main handler (delayed), but audio chunks arrive immediately on the WebSocket thread. Chunks hitting the old (released) decoder caused "Decode error, dropping chunk" spam and prevented the buffer from filling. Added a@Volatile decoderReadyflag to silently drop chunks during the brief decoder transition window. -
Fix Kalman filter instability on cellular networks — Removed three feedback mechanisms that caused divergence on high-jitter networks: continuous covariance inflation, normalized residual test with 10x explosion, and lack of warmup period. Replaced with absolute residual threshold, gentle inflation, and 50-measurement warmup.
Improvements
- 3-point interpolation for sync correction — Shifted from linear to 3-point interpolation for smoother audio rate adjustment.
- 10ms sync deadzone — Small sync errors within ±10ms are now ignored, preventing unnecessary micro-corrections.
- Landscape orientation fix — Fixed layout issues in landscape mode.
What to expect on cellular
- Time sync should converge within 5-30 seconds (previously could fail indefinitely)
- No more "Decode error" log spam at stream start
- RTTs displayed in logs should be reasonable (50-200ms), not 25+ seconds
- Playback should start and remain stable without repeated reanchor cycles