5.3.0
Audio robustness release for the software live path, closing out the audio half of the #107 follow-up (audio chopping on AC-3 broadcast channels).
Added
-
Live audio delivery is decoupled from video decode pace (#107). The software live (DVR) feeder fed audio interleaved behind the video renderer's back-pressure gate, capping the audio renderer's lead over the synchronizer clock below one second. On devices where software 1080i H.264 decode plus bwdif deinterlacing runs near real time, that margin is zero and every feeder stall was an audible dropout. An audio look-ahead pump (
AudioLookaheadPolicy+AudioLookaheadState, unit tested) now decodes and enqueues audio from the DVR ring up to a 4 second lead, fully independent of the video path. A chronically slow video decode now degrades to late video frames under smooth audio, the right priority. DVR seeks reset the pump cursor atomically alongside the combined feed cursor (compare-and-set, the seek wins). -
Live-edge source underruns pause and rebuffer instead of chopping forever (#107). When the source itself briefly delivers below real time and playback drains the ring at the live edge, the free-running synchronizer clock used to outrun the stream permanently: every later sample landed in the clock's past, which is continuous chopping that never recovers. The clock now pauses at 0.15 s of remaining audio lead when the ring is dry at the edge, refills, and resumes at 2 s, mirroring AVPlayer's stall handling on the native path.
-
aetherctl play --audio-statsand--host-calls seekback. The play harness can tap the decoded PCM and report per-second audio lead (alead) plus source-PTS continuity gaps (AGAP), and script a DVR rewind plus live-edge return in one run. This is the tooling the chopping report was diagnosed and verified with.
Verification
Against real Australian DVB tuner streams (1080i25 H.264 top-field-first, AC-3 stereo): a 120 s run holds the audio lead at 3.3 to 4.3 s with zero decoded-PCM gaps; a CPU-starved run (background QoS, all cores saturated) that previously fell 63 s behind within 45 s now degrades to brief pause-and-rebuffer cycles; DVR rewind and live-edge return recover the lead within a second. VOD and live-without-DVR paths are unchanged. 913 tests green, strict-concurrency clean, tvOS and iOS simulator builds green.
Thanks to tresby for the report and the tuner access that made live diagnosis possible.