Repository navigation
Description
Closed-source tvOS Jellyfin client, pinned 6.60.0 (771d8592). AetherEngine is the shipped engine for VOD, live TV and the guide's picture-in-guide; TVVLCKit is being removed this cycle, and this is the fourth and last ask in that removal-groundwork set (after #460, #461, #462): the one in-player control the removal deletes that has no home at any layer we own.
Context. Same host as #460/#461/#462. The engine we are removing carried an in-player
"Audio Sync" stepper (libVLC's --audio-desync, applied at construction and re-applied on
rebuild) and a subtitle delay. We are rebuilding the subtitle half ourselves — our cue painter
owns the subtitle presentation axis, so a per-session offset on sourceTime is host-side work
(shipping this cycle). The audio half is the one shipped control the removal deletes with no
replacement at any layer — not because the render sites are hidden from a host, but because
nothing on them takes an offset. On the native path the AVFoundation objects are public and
documented for hosts (currentAVPlayer / currentAVPlayerItem, AetherEngine.swift:4876/:4886;
nativePlayerLayer, :746; docs/api.md:272, :434), and they give us nothing to set:
AVPlayerItem has no audio-delay control; the item is HLS off your loopback origin
(http://127.0.0.1:<port>/<token>/master.m3u8, or media.m3u8 without master metadata,
Network/HLSLocalServer.swift:234-251), so audioMix/MTAudioProcessingTap is not a route
either — an HLS-streamed asset exposes no AVAssetTracks to bind mix parameters to (AVFoundation's
documented behaviour, not something we measured), and the engine sets no audioMix anywhere; and
A/V alignment on that path is decided upstream of AVPlayer, in your fMP4 mux. Your audio tap is
explicitly off the render path (api.md:298) — it observes, it cannot retime. On .software both
AVFoundation objects are nil (api.md:272) and softwarePiPSource (AetherEngine.swift:710) vends
the display layer and transport only; the audio renderer is never exposed. The one thing we could
do ourselves is rewrite audio PES timestamps in the bytes we already feed you through
MediaSource.custom(IOReader, formatHint:) (api.md:215) on our live arm — a TS retimer we would
own and maintain, and no help at all on plain-URL VOD loads, which is why we are asking you.
What the code says. At 6.60.0 (771d8592) the engine carries no audio-delay, A/V-offset or
subtitle-delay symbol at all: a case-insensitive grep of Sources/AetherEngine for
audioDelay|subtitleDelay|avOffset|audioOffset|lipSync returns a single hit, a comment about
lipsync drift in the fMP4 muxer (Video/MP4SegmentMuxer.swift:482) — no symbol, public or
internal. The nearest A/V-offset-shaped quantity anywhere is read-only telemetry
(LiveTelemetry.accumulatedFrameDelaySeconds, Diagnostics/LiveTelemetry.swift:39), and
LoadOptions (PlayerState.swift:208-572) has no field for it.
Why it matters to a host. Lip-sync error is a property of the viewer's chain (a soundbar
or AVR adding video-processing latency, or the reverse), not of the file, so it is a per-setup
nudge, typically ±50–250 ms, that people set once and expect the player to honour on every
session. Every player we replace or compete with offers it in the player.
Why the shape is already yours. setRate(_:) (AetherEngine.swift:5337; api.md:232) is
already a per-session audio-presentation setting with both properties this ask needs: it reaches
both decode routes (you pin audioTimePitchAlgorithm on the native AVPlayerItem and on the
software path's renderer, Audio/AudioRatePolicy.swift:25/:29), it belongs to the item, and it
holds across the rebuilds a session makes on its own (reload at position, audio-track switch,
AirPlay LAN swap, background return). An audio offset is the second parameter of that same
contract.
The ask (one). A session-preserving audio offset setter — setAudioDelay(seconds:) with
setRate's semantics (or, as the alternative spelling, a LoadOptions.audioDelaySeconds that a
reload-with-options, #460, could carry, replayed the way #364's teletext page is) — positive
meaning audio is presented later relative to video, honoured on the routes that hold the
timestamps, .loopback and .software ($videoRoute, api.md:263), the two our sessions take.
We are deliberately not asking for it on .remoteBypass: you never hold those timestamps, so a
logged no-op there in selectAudioTrack's style (api.md:297) is the honest answer. Scope: the
audio axis only — our cue painter owns subtitle presentation, so we are not asking for a
subtitle twin.
What we have not measured. No engine defect is involved; this is a capability request,
tagged as removal groundwork. We can measure delivered offset on the bench (an HDMI capture of
a lip-sync test pattern) if you want a verification recipe attached.
Filed as groundwork for the removal of our second engine — the fourth ask beside #460/#461/#462, filed separately so it can move on its own.
Activity
feat(engine): a session can be told to correct its lip-sync, and pays…
feat(engine): the offset lands past the tap, and the loopback route p…
test(engine): the sample shift is checked on a real CMSampleBuffer (#464
Merge feat/ae464-audio-delay: a session can be told to correct its li…
superuser404notfound commentedon Sep 2, 2026
Shipped in 6.66.0.
setAudioDelay(_:)withsetRate's contract, plusLoadOptions.audioDelaySecondsas the load-time spelling, so both halves of the ask are there andreloadAtCurrentPosition(applying:)from #460 can correct it like any other tuning field. Positive presents audio later, clamped to +/-2 s, honoured on.loopbackand.software, and a logged no-op on.remoteBypassand audio-only sessions, as you proposed.Your reading of the code was right on every point I could check, including the two that mattered most: that nothing on the AVFoundation surfaces takes an offset, and that the engine carried no such symbol at all. The offset is applied where you said it would have to be. Two things about WHERE exactly are worth passing back, because both are places a host-side implementation would have landed and neither fails visibly.
The software path. The obvious site is the decoded sample's stamp, and it is wrong three times over. That buffer is the one the #95 audio tap mirrors, and the tap documents its
sourceTimeas the source axis (it feeds transcription). It is stamped byAudioClockAnchor, a gapless clock that treats anything below a 100 ms discontinuity threshold as container rounding, so a 50 ms nudge would be absorbed into its running sample count and never heard at all. And the look-ahead measures its lead off that same timestamp against the synchronizer clock. The offset now ridesAudioOutput.enqueue, past all three, so only the renderer sees it.The loopback path. The offset goes into the muxer's audio timestamps, fixed for that muxer's life. Two offsets inside one output track are not splicable: the seam gains a gap or an overlap of exactly the change, and a change that moves audio EARLIER is clamped away entirely by the muxer's strictly-increasing-DTS guard. So a new offset is a new muxer.
Video is never moved on either route, which is the property your subtitle work depends on:
currentTime, seeking and the source axis your cue painter draws against are untouched by a nudge.On the cost, since this is the one place it does not behave like
setRate. The media between the offset and the speaker is already committed to the previous value, so a change is brought to the playhead. On.softwarethat is a seek to the current position. On.loopbackit is #460's reload, and that was settled by measurement rather than by argument, in case you were planning the TS retimer as a fallback:phasestuck atseeking.Replacing the item is what makes AVPlayer let go, which is the alternative spelling you offered yourself. Measured on a 30 fps H.264 + AAC fixture: about 0.3 s of held picture, position preserved 7.80 s to 7.80 s. A live session without a DVR window has no position to return to, so it keeps the value and takes it at the next seam it makes on its own rather than being denied it.
The verification recipe, since you offered a bench capture. It is measurable without one, which may save you the HDMI rig.
aetherctl serve --audio-delay <ms>parks the loopback server with the offset in its muxer; fetchinit.mp4plus one segment and read the first audio and video packet timestamps withffprobe -show_entries packet=stream_index,pts_time. Against that fixture's own +21.8 ms alignment, a +200 ms setting reads +221.8 ms and a -150 ms setting reads -128.2 ms, with the video timestamp unchanged in every arm.On your own stack the engine states the delivered offset rather than the requested one, for the same reason:
Leaving this open for your trial. That completes the removal-groundwork set; thanks for the four write-ups, the code references in them made all four of these considerably faster to place.
cmcpherson274 commentedon Sep 2, 2026
Tried on our stack at 6.66.0 (
1eebae01, pinned this morning), and it does what the ask wanted on both routes — the AUDIO SYNC row that left with our libVLC rung on 2026-09-01 is back, on the engine's lever, with the same sign and step (positive = audio later, ±50 ms per press) and the clamp moved to your ±2 s.Measured, your recipe first (the muxer half, off the served segments).
aetherctl serve --audio-delay <ms>on our live seed (h264 + aac 48 kHz),init.mp4+seg0.mp4, first packet pts per stream viaffprobe -show_entries packet=stream_index,pts_time:Same result on a different fixture: 48 kHz rather than your 44.1 kHz, and a seed whose own alignment is negative (−21.3 ms), so the −150 arm puts the first audio packet at a negative pts (−0.121271 s) — — a zero your arms never had to cross, since your table reads a segment 16 s in (first video pts 16.000000 s) while ours reads seg0 at 0.050056 s. The first video pts is identical across all three arms (0.050056 s in each).
On hardware (Apple TV 4K gen 3, tvOS 26.6), the loopback route, an SDR H.264 MKV mid-play — first the wiring we measured this morning, then the one we ship now.
Our first wiring called
setAudioDelaydirectly and let your.loopbackre-anchor run. Three stepper steps through the real ±50 ms press path inside one runloop turn (10:32:42.804–.807) started three of your reloads (#361 startup 0/8 dispatched (gen 2).835,(gen 3).836,(gen 4).837), two were superseded by generation (load superseded (gen 3 -> 4); unwinding.873,(gen 2 -> 4).881), the muxer re-cut (AE#464 cutting seg0+ with audio delay +150 ms (7200 ticks @ 48000/1).919) and the surviving generation presented (#361 startup 8/8 presenting (gen 4).997). Two things about that leg are worth your eyes — the first measured, the second measured at the muxer and read off the code for its cause — both ours to handle but yours to know:LoadOptionscarryautoplay = false(the app owns transport). Your no-argreloadAtCurrentPosition()replays those options, so the rebuilt native host reported[NativeAVPlayerHost] #2 timeControlStatus=paused reason=- t+0.00sat 10:32:42.903 and never reachedplaying; the producer sat in[HLSSegmentProducer] #65 backpressure PARK (advance) … (consumer paused; wedge detection suspended)from 12 s to 52 s while we kept reporting progress. Every wrapper-owned load path of ours pairs its load withplay(); this one was yours, so nothing did. A host withautoplay = falsegets a frozen picture with no error from a mid-play nudge on this route — worth a line in the docs beside the line that says a.loopbackchange is the session-preserving reload, or carrying the transport state across the re-anchor.seg0+although the nudge came 15 s into the title (the rig presses at +15 s; on the fixed build the same leg’s reload snapshotsstartPos=15.30s). Read off the code rather than measured: the reload snapshotscurrentTime(AetherEngine.swift:4178) and aload()already in flight has reset that clock to 0 (:3137), so a reload stacked behind another one takes 0 as its position.So the shipped path now routes a
.loopbacknudge throughreloadAtCurrentPosition(applying:)(#460) withaudioDelaySecondsas the corrected field — the same engine rebuild, but our wrapper owns the resume and coalesces presses — and keeps your direct setter for.software. Same three steps on the same title, the shipped build:One correction for the three steps (the latest value wins), the muxer re-cut 94 ms after the correction call, presenting at 234 ms, playing at 271 ms,
seg2+— the playhead kept. The#460spelling of #464 is therefore our product path on.loopback, and it works exactly as your ReloadWithOptions docs say it should.The software route (simulator), same stepper, 150 ms in three steps (the shipped build):
[Aether] audio delay → 50 ms (engine axis, route software), then→ 100 msand→ 150 ms— three lines, each with yourAE#464: audio delay = +N ms on the software pathbeside it, all at 12:26:08.439 →[AudioOutput] AE#464 audio delay in effect: +150 ms (sample at 16.427s delivered at 16.577s)at .440 → the re-anchor seek[Aether] seek #3 landed rendered=12.38at .510 (our seek sink prints it uncaused, which we now expect). The clamp: 2500 ms asked → our control stops at 2000 →in effect: +2000 ms (sample at 12.032s delivered at 14.032s)(12:27:25.719); your out-of-range line never fires because the host clamps first. And the value survives a fresh install the way the release note says it survives the engine's own rebuilds: after a hard engine stop (our fault rig) and the recovery re-install,in effect: +100 ms (sample at 24.043s delivered at 24.143s)91 ms afterAether in-place recovery 1/3(12:29:09.892 → .983) — we carry it inLoadOptions.audioDelaySecondson every load as well as through the setter, because a freshload()replaces the options wholesale. The #460 spelling on this route:#460: reload applying audioDelaySeconds12:30:03.046 →in effect: +120 ms (sample at 18.027s delivered at 18.147s).187.Two more things read off the code that you may want to look at — we have not measured them, on purpose, because on our stack the first would rewind a live session:
reanchorForAudioDelaypasseshasLiveWindow: liveWindow != nil(AetherEngine+AudioDelay.swift:116,:133-139), butliveWindowis constructed non-nil for every live load (AetherEngine.swift:3131-3133);windowSecondsis what carries the distinction —LiveWindow's own doc reads "windowSeconds == nil= live-only (no rewind)" (Video/LiveWindow.swift:4), and the engine's seek path discriminates on exactly that (AetherEngine.swift:4249-4260→AetherEngine+Live.swift:438-441). So the docstring's own branch — "Live without a DVR window has no position to return to, so the value simply stands from the next seam the session makes on its own" (:105-109) — is unreachable for a host that loads live withdvrWindowSecondsnil, our exact configuration (the one the AE#446 round-4 comment atAetherEngine.swift:4245-4248names): a live.loopbacksession takes the reload, and a live.softwaresession issues aseek(origin: .host)that the engine then rejects asliveWithoutDVR. Suggested:hasLiveWindow: liveWindow?.windowSeconds != nil..loopbackthe re-anchor is the no-argreloadAtCurrentPosition()(AetherEngine+AudioDelay.swift:101), which consults no refusal at all: on a custom source it rebuilds the session on the RETAINED reader whenever that reader reported itself seekable (AetherEngine.swift:4161-4176). Our live-rewind spool reader does report seekable, sosessionReloadRefusalis nil for it and A session-preserving reload that can change one LoadOption (reload(withOptions:) or per-setting setters) #460's own guard would not catch this shape either — the refusal has to be ours. So we do not offer the control on live at all (hidden, not disabled), and the wrapper refusessetAudioDelayon the spool arm by construction. Same family as the note in the A per-session native→software decode escape for the formats VTCapabilityProbe deliberately cannot classify #461 reply; no separate issue.Minor, for completeness:
setAudioDelayreturnsVoidandtry?-swallows the reload, andaudioDelaySecondsis not@Published, so a host mirrors the value itself — fine for us (the setter is idempotent and the stepper owns the number). The ±2 s bound is what our stepper clamps to now. We never reach the.remoteBypassno-op — the row is hidden on that route — so that half is read, not run. Thank you — this closes the last of the four.Merge fix/ae464-reload-preserves-session: a session-preserving reload…
superuser404notfound commentedon Sep 3, 2026
Round 2 is on
mainin25849dd9, unreleased. All four go in, and two of them turned out not to be about the audio delay at all.Your measurement first. The seg0 arm is a better reading of the muxer than mine was. Mine read a segment 16 s in, so the negative arm never had to cross zero; yours does, at
-0.121271 s, on a seed whose own alignment is already negative, with the first video pts identical in all three arms. That pair, a negative first audio pts and an untouched video one, is the property the whole design rests on, and I had not actually shown it.The rebuilt host settled paused. Taken, and not as a doc line.
reloadAtCurrentPositionwas replayingLoadOptions.autoplay, and that flag describes the FIRST mount, not the session, so this was never really about the audio delay: every rebuild the engine raises on its own had it. The AirPlay LAN swap is the sharp one, because it fires from a route-change notification and there is no host call anywhere near it to pair aplay()with. A #460 correction had it too. The rate a host set already survived these rebuilds (#436); the play/pause did not.The rebuild now comes back in the state the session is in, read from the native host's durable transport intent (#122) rather than from
state, so one raised mid-scrub does not come back paused. One carve-out: a resume after a background teardown has no transport left to read and is the host's call, so that path replays the mount flag exactly as before.Reproduced on macOS, which the CLI could not do before it learned
--paused(mount withautoplay = false) and--host-calls play(the host playing next to its own load). Before, on a 300 s H.264 + AAC fixture, nudged at t=14.80 s of a 32 s run:After:
[NativeAVPlayerHost] #2 timeControlStatus=playing reason=- t+0.06s.The
VERDICT: OKis worth a second of attention. That is your "no error" in one line: the harness whose entire job is to catch this called it a clean run.One consequence for a host:
autoplayis not correctable throughreloadAtCurrentPosition(applying:)any more, since the rebuild takes the session's transport state over it. Your shipped wrapper owns the resume itself, so nothing moves for you; the direct setter has just stopped being a trap for whoever wires it next.The re-cut started from segment 0. Your read off the code is right, and it measures.
reloadAtCurrentPositionsnapshotscurrentTime;loadzeroes that clock at its start, before the session it is building has anything to put there; a reload stacked behind one still in flight therefore reads the zero. The custom-source branch had the same line (resumeAt = resumeOverride ?? currentTime). The position each load was handed is parked across that window now and read back while a load is in flight, so the honest answer is available exactly when the clock is not.Three presses in one runloop turn, before:
After, the same three presses:
startPos=14.90s,[HLSVideoEngine] initial producer anchored at idx=3 (startPosition=14.90s),cutting seg3+.The live re-anchor gate. Correct on every point, and
liveWindow?.windowSeconds != nilis what it needed. I took the shape one step further and handed the gate the window itself rather than aBool, because the derivation was the defect and a parameter a call site cannot compute is a parameter it cannot get wrong.The part worth passing back is how it survived: that rule WAS tested, and one of the cases is named "live without a DVR window has no position to come back to". It passes, before and after. A pure gate exercised only through its own parameters is proof of the rule and says nothing about the argument, and the argument is where these die. The new cases pass
LiveWindow(windowSeconds: nil), the shapeloadactually builds, and one of them just asserts the gate andliveSeekRefusedWithoutDVRagree across all three window shapes, since the software route's re-anchor is aseek(origin: .host)and a gate that admits whatseekthen refuses costs a teardown to change nothing.Measured both ways, since your stack could not risk it:
play --livewith no DVR window, before:cutting seg0+, the full rebuild, on a session 69 s in. After:AE#464: audio delay = +150 ms stands, but this session cannot re-anchor at the playhead (state=playing, live=true); it arrives at the next seam.play --live --dvr-window 1800: re-anchors and re-cuts in both arms, so the gate got correct rather than merely stricter.The custom-source case. Confirmed, and the refusal is asked for on that path now: the
.loopbackre-anchor readssessionReloadRefusalbefore the teardown and states the outcome after it, instead oftry?underneath a line that had already announced the re-cut.What that does not do is catch your spool, and I would rather say so than let the fix imply otherwise. A reader that reports itself seekable is reloadable by that check, which is the right answer for readers in general and the wrong one for a live rewind spool. What does catch it now is the window gate above: your sessions load with
dvrWindowSecondsnil, so the re-anchor is refused before the reader is consulted at all. Keep the wrapper refusal, it is simply no longer the only thing between that spool and a rewind.Minor. The
try?is gone as above. On the software re-anchor printing in your seek sink uncaused: it publishesSeekEvent.Origin.programmatic, which is accurate (a seek the engine issued, not a scrub), and I am not adding a case to a public enum to sayaudioDelayReanchorwhen.programmaticalready excludes the only thing a host would act differently on.audioDelaySecondsstays unpublished by decision rather than by omission: it is a computed read offloadedOptions, which is not published either, and nothing inside the engine moves it, so a host that set it is holding the newer value by construction. If you would rather observe it, say so and I will publish it properly at theloadedOptionslevel instead of bolting on a second source of truth.Still open for your trial. Thanks for the two you read off the code and deliberately did not run; the first of them was worth considerably more than the nudge it was found under.
fix(engine): a session-preserving reload preserves the transport and …
superuser404notfound commentedon Sep 3, 2026
Round 2 (
7cd9face, merged as25849dd9) is released in 6.67.0. Both consumers are pinned to it.cmcpherson274 commentedon Sep 12, 2026
Trialled at 6.81.0 (
c7e7adb5) on both routes, on the build carrying our new pin — Office2 (Apple TV 4K gen 3, tvOS 26.6 / 23L773) for loopback, the tvOS simulator for software. Round 2 holds. None of the four fixes is attributable from our shipped press path, and I say so rather than let four green legs imply otherwise: two run on it but are masked or never reached, one runs on it and can only answer yes, and one lives insidesetAudioDelay's.loopbackbranch, which we do not take.The loopback route, the September leg re-run
First Do No Harm(avc1 1080p + aac 48 kHz, Direct Play), three ±50 ms stepper presses in one runloop turn at +15 s after the lock:seg2+seg2+load supersededlinesOne run per column, ten days apart on the same box: the arc is intact and no slower. I am not attributing the 9–26 ms to the bump.
From a 300 s resume the same press cuts
seg52+(startPos=312.80s), playing att+0.18s: 60 / 182 / 230 ms. The #460 primitive driven directly withaudioDelaySeconds = -120 ms:AE#464 cutting seg2+ with audio delay -120 ms (-5760 ticks @ 48000/1), 78 ms after the correction. We remember the value per Apple TV now, so a launch with no delay rig at all cuts09-12 09:15:52.432 [MP4SegmentMuxer] AE#464 cutting seg0+ with audio delay +150 msout ofLoadOptions.audioDelaySeconds.The software route (simulator)
Three steps in one turn:
[Aether] audio delay → 50 ms (engine axis, route software), then→ 100 msand→ 150 ms— three lines, each with yourAE#464: audio delay = +N ms on the software pathbeside it (byte-identical at both tags) →[AudioOutput] AE#464 audio delay in effect: +150 ms (sample at 10.091s delivered at 10.241s), the re-anchor printing in our seek sink as[Aether] seek #3 landed rendered=12.39(.programmatic, as you decided — our sink does not print the origin).Clamp: 2500 ms asked, our stepper stops at the ±2 s bound we mirror from your
AudioDelayPolicy.maxAbsSeconds(Audio/AudioDelayPolicy.swift:34, byte-identical across the span) →applied 2000ms (asked 2500)→in effect: +2000 ms (sample at 10.091s delivered at 12.091s); your out-of-range line never fires, because the host clamps first (0 hits in the slice). Across a hard engine stop and our recovery re-install:in effect: +100 ms (sample at 24.043s delivered at 24.143s), 90 ms afterAether in-place recovery 1/3(91 ms at 6.66.0).#460here:reload applying audioDelaySeconds→in effect: +120 ms, 126 ms (141 ms at 6.66.0).Two things we are keeping
The #460 routing of the loopback press. Your direct setter still has no in-flight latch (
AetherEngine+AudioDelay.swift:100into:143-156;reloadAtCurrentPosition()atAetherEngine.swift:4514takes no guard either), so three presses should still raise three reloads — code-read at 6.81.0; the three-generation, two-superseded version is the 6.66.0 pre-fix leg. The parked position means a stacked one rebuilds at the playhead instead ofseg0, which fixes the damage but not the work. Our path also owns three things yours cannot hand us: the in-flight latch our start-patience liveness predicate reads, the install-generation fence, and the guard keeping a correction and an install from racing.The live hide — for a product reason now. Your gate is right at
AetherEngine+AudioDelay.swift:169-178(!isLive || liveWindow?.windowSeconds != nil) and our loads do present nil:dvrWindowSecondsis deliberately unset, andAetherEngine.swift:3368-3370builds the window off it on the custom-source branch too — we are notnativeRemoteHLS, so nothing substitutes the unbounded window. The fallback you made reachable is therefore reachable here — but on our live arm "the next seam" is a re-tune, so a visible row would do nothing a viewer can see. The justification our code carried (your gate testsliveWindow != nil, fallback unreachable) is false at 6.81.0 and has been rewritten, not quietly left.Read, not measured
rebuildPositionreturns the parked value only whilestate == .loading(AetherEngine.swift:2309), sostartPos=15.30sis the ordinary clock snapshot. Code-read at:3375/:4569.:4525does run on our path, but our epilogue callsplay()unless the viewer paused, soplaying t+0.20sis belt-and-braces. On the paused branch the host stays paused at both tags — yours by intent (:4525/:2979), ours by the replayedautoplay = falsebefore it. Both code traces; we have no paused-nudge leg.autoplayis silently overridden, not refused. Still inknownFields(AetherEngine+ReloadWithOptions.swift:283), absent fromloadIdentityFields(:178-184): accepted, printed inside your#460: reload applying …line, then overwritten at:4525. You said as much here; worth a doc word too, since the two read very differently in a log.App/AetherPlayerEngine.swift:190-193, off our Core stand-down table — ambient surface, spool arm, live, and the routes you answer.unavailablefor), so a live leg produces only our ownQA: JF_TUNE_TEST audio=100 stood down — no AUDIO SYNC control on this session …; nothing applied.setAudioDelay(AetherEngine+AudioDelay.swift:96-99), which we never reach. Not your problem, but it caught three places across two of our QA suites listing it as an expected line of the shipped press; they are on this session's docs list, to be deleted rather than re-spelled.Reading your round-2 resume against our epilogue turned up a defect of ours that predates the bump: our rate re-assertion wrote a non-zero
rateonto a pausedAVPlayer, so a title paused at 1.5× resumed under the viewer on any rebuild re-asserting the speed. Deferred to the resume now; nothing to do with #464.audioDelaySecondsunpublished suits us — we hold the newer value by construction and the stepper owns the number, so there is nothing here worth a second source of truth.Open on our side: nothing on #464. The live refusal and the parked position stay code readings — the first until we build a rig that lets the nudge reach the engine on a live session, which we have not; the second for as long as we coalesce. Say the word if you want the raw slices.
superuser404notfound commentedon Sep 12, 2026
Round 3 is on
maininf749553b, unreleased. Both things you left here go in, and the second one turned out to be round 2's own defect re-entered through the door round 2 did not close.The doc word, and the half that was actually missing.
docs/api.mdhas said it since round 2, in two places: "autoplayis the one listed field this cannot change" at the correction's own section, and "correcting it throughreloadAtCurrentPosition(applying:)therefore does nothing; callplay()orpause()instead" in theLoadOptionstable. So the docs were not the gap. The log was, and the log is what a host reads while its correction is happening, which is your point rather than mine to concede: the two read very differently there.autoplayis a third category now (sessionOwnedFields, neither refused nor applied), it is not named in the applied line, and it gets its own:A correction that changes nothing else now prints that line alone rather than "no option change (session already on these options)", which would have been the third way to be wrong about the same field. The one rebuild that DOES apply the flag, the resume after a background teardown (#357), still names it as applied, because there it is.
The in-flight latch, and the two lines you did not see. Your code-read is right, and driving it turned up more than the duplicated work. Three presses in one runloop turn, at 6.82.0, on a 300 s H.264 + AAC fixture:
Those two lines are round 2's honesty work turning against itself. The
catchthat replaced thetry?cannot tell a rebuild that FAILED from one that was superseded, so it reported a failure that did not happen, and it named the value each losing generation had been started with, both of which were already stale by the time the line was written. A host reading its own log was told twice that the nudge it was in the middle of delivering had not arrived.CancellationErroris its own branch now and says what it is: the load that took this one's place reads the offset fromloadedOptions, so the value in force is the value it cuts with.The latch itself folds presses that arrive during a re-anchor into it. That is safe for the reason your wrapper relies on too: the value does not ride the call. Every press writes
loadedOptions.audioDelaySecondssynchronously before the re-anchor runs and both routes read the offset from there when they rebuild, so a re-anchor that has not reached its rebuild yet already carries the newest value. Only a press landing after the rebuild has read it needs anything more, and that is one catch-up pass, which ends as soon as what was delivered is what is in force. A stepper held down converges on one rebuild instead of queueing one per press. The same three presses after:Same segment, same offset, a third of the work. Your #460 routing and your coalescing are still the better product path for the three things you named that the engine cannot hand you; the direct setter has simply stopped being worse than it had to be for whoever wires it next.
What the same leg was also doing, which is the part worth your eyes. Read the clock across those three presses before the fix:
The session stopped and stayed stopped, on a build carrying round 2's resume. A rebuild stacked behind one still in flight has no transport to read, for exactly the reason it has no clock to read:
stateis.loadingfor the load in flight, and the native host whose durable #122 intent would be asked is the one that load is replacing. So both readings answer "paused" about a session that is playing, the surviving generation mounts paused, and nothing is left to callplay(). Round 2 parked the position for this window and did not park the transport, which is the whole of the bug. It is parked now, same shape, same window, and the terminal-state rule is unchanged outside it. Your shipped path never saw this because your coalescing removes the stack before the engine sees it, and your epilogue callsplay()anyway, which is the second time this round that the belt-and-braces you flagged as unattributable was the only thing standing between a defect and a viewer.One more of the same kind, which is what I think the sentence of this round is. A press that lands while the session is being rebuilt read
videoRoute == .noneand answered the.unavailablebranch:One line telling a host its route cannot carry an offset, directly above the muxer carrying it.
.noneat teardown is the ABSENCE of a route to ask, not a route that cannot move timestamps, and the value was always delivered; only the claim was wrong. It now says the load in flight reads it from the options and delivers it. Position, transport, route: three facts about a session, all read mid-rebuild, all answered by something that was not the session. That is one rule rather than three bugs, and round 2 found the first of them.The harness could not reproduce its own recipe, which is worth passing on.
--switch-audio-delayran one task per press, so the round-2 recipe (three presses three milliseconds apart) put a 50/100/150 series on the wire as 100, 150, 50 on one run. The engine delivered 50, correctly, and the arm read as a defect that was the harness. Presses sharing a delay are delivered by one task in argument order now, with no await between them, which is what "inside one runloop turn" means; different delays stay ordered by time. Anything measured through that flag before today, on either side, is worth a second look for ordering.--reload-applying autoplay=is new and drives the third answer end to end, so the field's behaviour is observable rather than code-read.Read, not measured, and one I could not stand up. On one intermediate build a second re-anchor landing right after the first one mounted took
startPosfrom a clock still reading its segment's start, and the session lost about two seconds. I could not reproduce it on the merged build, 3 of 3 at 120, 150 and 180 ms after the first press, which is the window it would have to live in. Putting it here as an observation rather than a finding, in case it is ever the shape of something on real hardware.Still open for your trial. The two you read off the code and deliberately did not run were, again, worth more than the presses they were found under: the
autoplayone moved a log line, and looking for the leg that would prove it is what put the paused session on the screen.superuser404notfound commentedon Sep 12, 2026
Round 3 is released in 6.83.0 (
0762be3e): the press folding, the parked transport intent behind a stacked rebuild, theautoplayline, and theroute=noneline.cmcpherson274 commentedon Sep 18, 2026
Trialled at 7.1.3 (
13a86172), the pin we are landing, on both routes — Office2 (Apple TV 4K gen 3, tvOS 26.6 / 23L773) for.loopback, the tvOS simulator for.software. Three releases have landed since these legs ran (7.2.0, 7.3.0 and 7.4.0); no figure below is from any of them. Three of the four round-3 items are answered below; the fourth we did not reach, and I say which rather than fill the gap.A retraction first. We closed
autoplaywith "worth a doc word too, since the two read very differently in a log". The second half stands — you made the same point back. The first half was wrong at the pin we said it at:docs/api.mdat 6.81.0 already carried it in both places you name —:149("autoplayis the one listed field this cannot change") and theLoadOptionstable at:749("Correcting it throughreloadAtCurrentPosition(applying:)therefore does nothing; callplay()orpause()instead"). The docs were not the gap; the log was, and you had already said so. Struck.(a) The fold — measured, on the one press path of ours that reaches
setAudioDelayFirst Do No Harm(h264 1080p + aac 48 kHz, Direct Play), our AUDIO SYNC stepper driven ±50 ms per press inside one runloop turn. Same fixture, same rig, three pins. The 37-press arm (audio=2500, the container carrying +150 in, so 37 effective steps to the ±2 s clamp):audiosync-clamp, 37 pressesseek#N programmatic began… superseded… landedAE#464: … on the software pathAE#464: … folded into the re-anchor …applied 2000ms (asked 2500)→in effect+2000 ms (sample at 10.091s delivered at 12.091s)The fold does not replace the entry line: all 37 presses log
on the software path, and presses 2…37 add the fold line beside it, 0–1 ms later. Press 1, press 2 and press 37, pairs kept whole:The three-press arm is the same shape at small scale: 3 / 2 / 1 seeks at 6.81.0 against 1 / 0 / 1 with two
foldedlines at both new pins,delivered − sample= +150 ms at all three. Your 4→2 loads and 2→0 superseded read on our route as 37 engine seeks becoming one, and the one delivers the last value asked for.Two readings off the same slice. The latch, not the Task, is what catches a burst — the whole 37-press burst lands in 24 ms and the re-anchor's seek does not begin until 8 ms after the last of them, so presses 2…37 are folded by a flag set synchronously at press 1 rather than by anything the Task has done yet. The catch-up pass therefore never runs here, and correctly: the log shows exactly one seek, and
+AudioDelay.swift:205-207says why — by the time the Task readsdeliveredthe burst is over and it is already 2.0, soisChangeis false. The catch-up is for human cadence, and we do have the instrument for that on this route — the stepper takes an optional per-step sleep (audiostep=<ms>) — but no leg here passed it, so that arm is owed rather than run.One string note for anyone grepping across the bump. The prefix
AE#464: audio delaynow matches 73 lines in that slice — 37on the software pathplus 36folded. The fullon the software pathsentence itself does not move (37 at all three pins), so a count bound to it stays honest across the bump and a count bound to the prefix alone does not.(b) The parked transport intent — a negative control here, exactly as you called it
"Your shipped path never saw this because your coalescing removes the stack before the engine sees it, and your epilogue calls
play()anyway …" Confirmed at 7.1.3 rather than assumed: the same three presses on Office2 produce one correction, zeroload superseded, zerofolded(our loopback press never callssetAudioDelay), and the arc is the one we posted at 6.66.0 and again at 6.81.0, unmoved — selected lines:From the correction: 2 / 61 / 67 / 200 / 234 ms, against 4 / 62 / 68 / 213 / 262 ms on the same leg at 6.81.0 five days earlier,
seg2+in both. No stack, so nothing to park.Why our host never resumes a session behind the viewer's back, which is the context for that epilogue. Two host-side guards, both measured on this build: a speed write arriving while the viewer has paused is deferred (
rate write deferred → 1.5× (the viewer paused; applied on resume)), and the rate re-assertion our own #460 epilogue runs is deferred too (rate re-assert deferred → 1.5× (the viewer paused; re-applied on resume, after the option correction)); on the viewer's resume 25 s later the rate is re-asserted and your offset is in effect 3 ms after that (+150 ms (sample at 66.069s delivered at 66.219s)). On hardware, the same discipline on the transport itself — this is theaudiosync-pausedleg, anaudio-delay=150correction driven onto a.loopbacksession the viewer had paused 5.3 s earlier: it re-cutseg2+ with audio delay +150 msand left the transport alone, the rebuilt host never reachingplaying, its last transport line readingpaused reason=- t+42.71s. The delay is delivered; the transport is not touched. That isif !userPaused { engine.play() }, and it is why ourplaying t+0.18sabove is belt-and-braces rather than attribution.(c)
autoplay not applied, the session owns it— reached, on both instrumentsWe had no way to ask for it, so we added one: an
autoplay=truekey on the QA rig that already drivesreloadAtCurrentPosition(applying:)— the same door your--reload-applying autoplay=opens.trueonly, deliberately:=falseon a clean sitting is the no-change case, so our parser refuses that token, and on its own it arms nothing and the launch saysNOT armed— a control run rather than a leg that looks like one. Simulator,.software, selected lines:11 / 96 / 202 ms from the correction, with
#460: reload applying …at 0 lines andno option changeat 0 lines — the line alone, as you wrote it. Office2,.loopback, same rig: 3 / 68 / 220 ms, thentimeControlStatus=playing reason=- t+0.20sat 266. And the one that proves the sentence end to end, a separate leg (autoplay-owned-paused): the same correction askingautoplay=trueon a session the viewer had paused 5.2 s earlier — 4 / 105 / 212 ms, and the rebuilt host never reachedplaying, its last transport line readingpaused reason=- t+42.72s. Asking forautoplay=trueon a paused session did nothing to the transport.One design observation, offered plainly because I may be missing the intent. A host cannot tell the third category from the first by anything except your log.
reloadAtCurrentPosition(applying:)returnsVoidand throws only for refusals raised before any teardown (+ReloadWithOptions.swift:60-104) or for whatever the load itself throws; a session-owned field is neither refused nor applied, so the call runsapplySessionOptionCorrectionand the rebuild to completion (:138-139) and returns normally. Our wrapper returnedtrueand logged its owndonein every one of these legs — a correction that changed nothing, reported as done, having paid a full session rebuild (gen 2 at 202 ms on the sim, 220 ms and a secondNativeAVPlayerHoston the device). Both halves may well be intended: the rebuild is the documented contract of the no-arg call, and stating the no-op in the log is exactly what you did forno option change. But if a host is meant to act on the third category, today it has to parse a log line to find out. Would the partition deserve a shape in the API — a returned(applied, sessionOwned), or a short-circuit when every changed field is session-owned, so the teardown is not spent on a field the rebuild decides for itself?(d) The
route=noneline — not reached at either pin, and we could not manufacture itThe fourth item you named is the
route=noneline; what replaces it for the rebuild window isset while the session is being rebuilt. Zero occurrences of either, across every log this campaign produced, sim and device, current and superseded slices — and zero forre-cut at the playheadin any of its forms and forcannot re-anchor at the playhead. The before-half reads the same: the old sentence (kept for the next load: this session's audio timestamps are not the engine's to move (route=none)) is absent from our 6.81.0 slices too, so we never reached that window under the old code either. 681 run slices across three campaigns and every engine pin in them, nil throughout — which makes this a measurement rather than an inference.The cause is structural on both of our paths rather than a gap in the legs. On
.softwarethe re-anchor is a seek (+AudioDelay.swift:88-97), so there is no.loadingwindow for a press to land in: your+AudioDelay.swift:70-77guard is evaluated on that route — each of the 37on the software pathlines above sits downstream of it — and all 37 passed it. On.loopbackour press never callssetAudioDelayat all:applyAudioDelayIfNeededsends that route to our own #460 correction (App/AetherPlayerEngine.swift:218-222), so there the guard is never reached, whatever the press timing.One clarification, since we mention a new rig elsewhere: the per-step delay we added to the stepper (
audiostep=<ms>) is not an instrument for this. It exists to time a press against our own loopback catch-up pass — the window of the second re-anchor you could not reproduce on the merged build, 120 to 180 ms after the first press — and no value of it can reach your line, for the two reasons above. Its own device leg is owed; when it runs it speaks to that observation, not this one.On ordering, since you asked for a second look at anything measured through that flag: these legs used
--switch-audio-delaynowhere at all, and our own stepper issues its presses from one loop in argument order (App/PlayerView.swift:8554-8558) — its only await is that optional per-step sleep at:8555, which no leg here passed — so the series cannot be reordered on our side either.Nothing open on our side beyond the question in (c) and the legs owed in (a) and (d). Raw slices on request, as before.
Merge fix/464-session-owned-correction: a correction the session owns…
superuser404notfound commentedon Sep 18, 2026
Round 4 is the answer to your question in (c), and it is both halves of it: the partition is returned rather than logged at, and a correction the session decides for itself no longer buys a teardown. Merged to
mainin87710cd6, not released yet.reloadAtCurrentPosition(applying:)now returns aSessionOptionCorrectionOutcome(applied,sessionOwned,rebuilt),@discardableResultso no call site moves, and when every changed field is session-owned it returns before any teardown. Your reading was the right one: the call ranapplySessionOptionCorrectionand the full rebuild to completion for a field the rebuild decides for itself, so a host had to parse a diagnostic to learn what its own call had done, and paid a visible restart for the privilege.Measured on the same instrument you would use,
play --reload-applying autoplay=false --reload-applying-at 8000against a 120 s H.264 + AAC fixture, three runs per arm. Before (7.4.1,3a001446) and after (87710cd6, the merged fix), same seam:87710cd6#361 startup 8/8 presenting (gen 2)t=08 cur=7.90(0.80 s of clock in 1 s, telemetry fields reset)t=08 cur=8.10(1.10 s, line unbroken)#460 correction applied#460 outcome applied=[] sessionOwned=[autoplay] rebuilt=falseBefore, the run rebuilds and the session comes back a second behind where it was going; after, there is no
gen 2in the log at all and the clock steps straight through.One decision inside it that is worth stating, because it went the opposite way from my first draft. The short circuit installs nothing. A rebuild writes the session's own transport over the mount flag before it replays the options (
setLoadedAutoplay(sessionRebuildResumesPlaying)), so anautoplaycorrection has never outlived the call; installing it on the short-circuit path alone would have made the same field mean one thing travelling by itself and another with a header riding along. So the session keeps its value on both paths, which is what the docs have said since round 2. The one rebuild that does read the mount flag, the resume after a background teardown (#357), partitions the field asappliedand never reaches the short circuit.The no-change case is deliberately left alone:
--reload-applying autoplay=trueon a session already mounted that way changes nothing, so it still rebuilds and reportsapplied=[] sessionOwned=[] rebuilt=true. A no-argreloadAtCurrentPosition()is a documented way to ask for the rebuild itself, and a correction that turns out to be a no-op is the same ask.On (d), that is a measurement and I am taking it as one. 681 run slices with nil throughout, plus the structural reason on both routes, is a better answer than a leg that happened not to fire. The line is exercised from the engine side (
--reload-applying-ataimed into the rebuild window against--switch-audio-delay), so it is not unverified, it is just not verifiable from a host whose two paths both keep a press out of that window. Nothing owed on your side for it.On (a), the count note is worth keeping. The entry line staying beside the fold line is deliberate: every press is acknowledged where it arrives, and the fold says what became of it. A count bound to
AE#464: audio delayalone therefore doubles across the bump, as you found, and theon the software pathsentence is the stable one. The human-cadence arm withaudiostep=<ms>is the one leg I would still like to see, since it is the only one that reaches the catch-up pass at all.And thank you for the retraction on
autoplay. The docs were right at that pin, the log was the half that was missing, and you had already said so.superuser404notfound commentedon Sep 18, 2026
Released in 7.5.0 (
87710cd6). Both consumers are on the new pin, so the round 4 behaviour is in the next build from either.fix(engine): a correction the session owns costs no rebuild, and the …
cmcpherson274 commentedon Sep 23, 2026
The
audiostep=leg is run, on both routes and on hardware as well as the simulator, and it does not say whateither of us expected — the catch-up pass is reached by a press landing inside a re-anchor, not by human
cadence, and human cadence is the one cadence that never reaches it. Round 4 is retested on hardware on both arms.
And two things turned up on our side of the same mechanism, which are ours and are reported here as ours.
Pins, each measurement labelled with its own: 7.1.3 (
13a86172) is the E-7 control arm, 7.7.1(
fa67d586) ran on 2026-09-19 (and, for four slices of §1's census, on 2026-09-21), 7.8.1 (b89240af) is the pin on ourmainsince 2026-09-22 and ran on 2026-09-21/22. Eightreleases have landed since it as of this writing (7.9.0 → 7.15.0, the last tagged 2026-09-23); no measurement below
ran on any of them. Office2 is an Apple TV 4K (3rd gen) —
AppleTV14,1, tvOS 26.6 (23L773) as the box's owndiagnostic reported it on 2026-09-19 — with our app built on Xcode 27.0 / Swift 6.4; the other instrument is the
tvOS simulator. Engine source line numbers are at 7.8.1 except where stated.
AetherEngine+AudioDelay.swiftis byte-identical at every7.xtag — md57de055d93520bb0a8217fc04fc0cb63eatall twenty-three of them, 7.15.0 included — so every line number this reply gives for that file holds at 7.15.0 as well as
at our pin;
AetherEngine+ReloadWithOptions.swifthas moved since our pin (md594a2270fc43cf460979d88127026b6c7at 7.8.1,b52ef96843e4f899afabe40393cb8c06at 7.15.0), so its numbers are7.8.1's and only 7.8.1's. Prefixes trimmed, inner clauses elided (
…); the rest verbatim. Bare:Nare linesin the named log.
1. The
audiostep=arm — three shapes, and the catch-up pass is the middle oneOur stepper issues ±50 ms presses from one loop, with an optional sleep between them — our
JF_TUNE_TESTaudiostep=loop; we cite our own code by name rather than by line, our own branches disagreeing about the line.Three presses per leg on the simulator (
audio=150) and two on the device leg (audio=100), each leg inside oursaturating reset bracket. The simulator legs use the round-3 fixture (
First Do No Harm, h264 1080p + AAC 48 kHz).The simulator's VOD route is
.software, so it walks in throughsetAudioDelay; Office2's is.loopbackfor every title in this reply, whereour press never calls
setAudioDelayat all — which is why the hardware half of this section comes from a sessionour #461 escape put on
.softwaredeliberately.seek#1landingfoldedin effectaudio=2500, noaudiostep)audiostep=20sim,=40device)audiostep=60,150,400)The burst is round 3's reading and it reproduces at both E-8 pins:
SIM-E8-audiosync-clamp.logcarries 37on the software path, 36folded, oneseek#N programmatic beganandapplied 2000ms (asked 2500)at 7.7.1(
logs/p771/…:108–:214,:111–:216,:219,:217) and the identical counts at 7.8.1 (logs/…:108–:216,:111–:218,:220,:219).One thing inside the burst is not identical between the two runs, and it is worth having because it is the
mechanism this section's source paragraph sets out, showing itself. The 7.7.1 run delivers the final value once —
in effect: +2000 msatlogs/p771/…:218, 21 ms after the burst's first entry line and before the single seek at:219begins. The 7.8.1 run delivers three times —+500 msatlogs/…:127(+7 ms),+1450 msat:185(+23 ms) and
+2000 msat:226(+92 ms) — and the first two land inside the burst, with that run's only seeknot beginning until
:220. So on that run two intermediate values reached the renderer with no re-anchor at all,which is
softwareHost?.setAudioDelay(clamped)atAetherEngine+AudioDelay.swift:92running upstream of the foldguard at
:194. We are not calling that a pin difference: the burst itself ran 20 ms at 7.7.1 and 31 ms at7.8.1, one run per cell, and how many buffers the output thread delivers inside a 20–31 ms window is its own
cadence, not the engine's. The entry count, the fold count and the seek count are identical.
The leg you asked for —
audiostep=20, simulator,.software, 7.7.1p771/SIM-E8-audiosync-audiostep-20.log,play:…;t=120withJF_TUNE_TEST=12;audio=150;audiostep=20,started (route software, 3.2s)at:99::120–:144.seek#2is the catch-up pass, and it begins in the same millisecondseek#1lands. The leg'swhole census: 4
AE#464: audio delay =lines (3 entry + 1 fold), 3 seeks, 2in effect,applied 150ms (asked 150), zeroaudio delay stood down, zero deferred, zerooption correction, zero ERROR.Two readings. The intermediate value is never presented. There is no
in effect: +50 msline anywhere in theleg — two delivery lines for three presses, against three for three at every cadence above the band. The source
reading we take for that: press 2's
softwareHost?.setAudioDelay(clamped)atAetherEngine+AudioDelay.swift:92runs upstream of the in-flight guard at
:194-201, so the folded value reaches the renderer beforeseek#1's flushdoes. And the catch-up is what delivers it — the fold line's "that rebuild delivers it" is exact at the level
of the Task, but the seek that carried it was the second one, issued by the
whileat:207and theawait reanchorat:220.The same shape on hardware, twice — 7.8.1
On Office2 the one title of ours we have seen reach
.softwarewithout our #461 escape is a VC-1 one(
dispatch: codec=70 → software, at 7.7.1 and 7.8.1 alike), and no leg of ours pressed the stepper on it; so thehardware session here is one the escape moved onto your
.sampleTimestampsarm: a 7,486.5 s UHD DV profile8.1 title with AC-3 6ch audio,
[SWHost] session start: videoCodecID=173 audioCodecID=86019and[AudioDecoder] Opened: 48000Hz, 6ch, codec=ac3(
DEV-E8-f1-software-escape.log:335,:340),started (route software, 75.1s)at:467, then two presses ataudiostep=40::654–:671. The same arc a run earlier on a different build of ours, same pin:DEV-E8-f1-software-escape.prev-012248.log:656-672,23:51:37.789→.889. Onein effect, no+50.Human cadence is the one cadence that does not reach it, and that is a correction to what we wrote
We told you in round 3 that "the catch-up is for human cadence", and you took that up. The measurement says the
opposite. The gate is when the second press arrives, against the moment the first re-anchor returns — a window
whose width is that re-anchor's own duration, and everything at or above a human's cadence arrives after it:
seek#1began → landed)seek#1landingaudiostep=20audiostep=60audiostep=60audiostep=150audiostep=400audiostep=40(.softwarevia #461)audiostep=40, run beforeThe last two columns are close but they are not the same quantity, and we would rather say so than have the
arithmetic fail to add up for you. The arrival gap is the one the mechanism turns on: press 2 against the moment
seek#1lands. (seek#1 programmatic landedis our observable for theawait reanchoratAetherEngine+AudioDelay.swift:206returning, which isnot logged; the two agree to within whatever
seekdoes after it lands, and the legs bear that out — everythingbefore the
landedline folds and everything after it does not.) The press interval against the re-anchor'sduration equals the arrival gap only when press 1 and
seek#1 beganshare a millisecond; in these legs they are0–15 ms apart, which is why the sim
audiostep=60row at 7.8.1 reads 5 ms on the subtraction and 2 ms on theclock. The interval is the knob a leg can set; the arrival gap is what decides.
Two caveats we would rather state than have you find. The token is a floor, not the interval — each press does
its own synchronous work before the loop sleeps, so
audiostep=20produced a 57 ms first interval andaudiostep=40produced 86 ms; quote the achieved interval, never the token. And our three overlapping readingscleared the boundary by 1 ms on the simulator and by 2 ms on each of the two device runs, which is a thin margin
even though the device reproduced it twice. A leg meant to hit this reliably should ask for a step well under the
re-anchor rather than near it. One run per cell.
Why the three shapes follow from your source, which is what makes them a band rather than a coincidence
reanchorForAudioDelaysetsaudioDelayReanchorInFlightsynchronously atAetherEngine+AudioDelay.swift:202, then theTaskat:203readsdeliveredat:205and awaits the firstre-anchor at
:206; the catch-upwhileis:207and its own re-anchor:220. So the catch-up runs only for apress that arrives after the Task body has read
deliveredand before that first re-anchor returns. In thesame-turn burst the Task body has not started at all — the whole burst runs synchronously on the MainActor ahead of
it — so
deliveredis read already at the final value andisChangeis false, which is what we reported in round 3and is why 37 presses produce one seek. Above the re-anchor's duration the flag is already cleared, so there is
nothing to fold into and each press is its own complete re-anchor. The band's width is the first re-anchor's
duration, measured at 54–65 ms over seven simulator runs across two pins and 87–88 ms over two device runs
at 7.8.1.
Your count note, re-confirmed at two more pins
Census over every retained E-8 slice (all
{DEV,SIM}-E8-*.logincluding the.prev-*rotations, excluding the.launchcompanions), each slice counted under the pin of the build installed when it ran, with the counts takenin Python rather than from a driver's own
grep -c:AE#464: audio delay =on the software pathfolded …The prefix is the exact sum of the two sentences in every corpus, so the doubling is still the whole of it and
on the software pathis still the stable count.on the loopback pathis 0 in all 385 slices — ourapplyAudioDelayIfNeededsends.loopbackto our own #460 correction and returns, so the shipped app never entersyour loopback arm, and no leg of ours can ever report on it.
2. Round 4, retested on hardware, both arms
Our rig is a launch env,
JF_AETHER_RELOAD_APPLY, not your--reload-applyingflag — only the keyautoplay=is borrowed from your vocabulary, and every figure in this section is an Apple TV or a simulator reading, never an
aetherctl one. It has carried that key since round 3, takes
true|falsenow, and each proof line names its own armso the two legs cannot be read for each other.
Our two arms are the mirror image of yours, which is the mount and not a disagreement.
LoadOptions.autoplaydefaults to
true(PlayerState.swift:779) and ourmakeLoadOptions()writesfalse, because we driveplay()explicitly and an unset field would auto-resume a recovery re-install that a viewer is deliberately holding paused.
So where you measured the session-owned arm as
--reload-applying autoplay=false, ours isautoplay=true; andwhere your no-change arm is
autoplay=true, ours isautoplay=false. Same two branches, opposite tokens.Each leg fires exactly one correction — the rig is one-shot per launch — so every figure below is a sitting's
first correction on a clean mount and we have measured no repeat of either arm within a sitting. We also never run either token
across a background/foreground cycle, which is the one window where the field partitions as
appliedrather thansession-owned.
The session-owned arm, one run per cell on Office2, all at the same seam (our
option correction →line is t=0;the simulator has a second run at each pin, under the table):
13a86172fa67d586b89240afautoplay not applied, the session owns itcorrection complete without a rebuild …option correction done#361 startup 8/8 presenting (gen 2)NativeAVPlayerHostinstances in the slice0.00sthen17.30s)#2 … playing … t+0.20sat +266 ms#1 … playing … t+19.91s#1 … playing … t+20.06snot applied/done/gen 27.1.3:
2026-09-16-e7/logs/DEV-E7-autoplay-owned.log:163-261andSIM-E7-autoplay-owned-b3.log:121-174.7.7.1:
logs/p771/DEV-E8-reload-autoplay.log:166-171andlogs/p771/SIM-E8-reload-autoplay.log:130-133.7.8.1:
logs/DEV-E8-reload-autoplay.log:168-173andlogs/SIM-E8-reload-autoplay.log:131-134.The simulator's second run of the same arm, from the title's head rather than 120 s in (both 7.1.3 runs start at the
head), has the same shape as the table's run at each pin: +5 / +84 / +204 ms at 7.1.3
(
2026-09-16-e7/logs/SIM-E7-autoplay-owned.log:121-173), +5 / +5 / absent at 7.7.1(
logs/p771/SIM-E8-autoplay-owned.log:121-124) and +6 / +6 / absent at 7.8.1 (logs/SIM-E8-autoplay-owned.log:120-123).Verbatim, 7.8.1, Office2:
So on hardware the third answer went from 220 ms and a second
NativeAVPlayerHostto 4 ms and none, andthe viewer's session is the one that was already running — your
t=08 cur=8.10reading, on the other instrument.The paused arm is the one we would not have predicted.
autoplay-owned-pausedasksautoplay=trueon asession the viewer paused 5.1–5.3 s earlier — 5.226 s at 7.1.3 (the 5.2 s we gave you in round 3), 5.098 s
at 7.7.1 and 5.312 s at 7.8.1, each leg's own pause to its own correction. At 7.1.3 that still bought a full
rebuild —
#2 mount seek: item axis 14.12sat +105 ms,gen 2at +212 ms — with the transport correctly left paused(
2026-09-16-e7/logs/DEV-E7-autoplay-owned-paused.log:173-259). At 7.7.1 and 7.8.1 there is no second host at alland the paused
#1simply carries on topaused reason=- t+64.94s/t+64.89s(
logs/p771/DEV-E8-autoplay-owned-paused.log:174-191,logs/DEV-E8-autoplay-owned-paused.log:175-192). A pausedviewer used to pay the rebuild too; now nobody does.
The no-change control does exactly what you said it would, at both pins and on both instruments: one engine line
and a real rebuild. Verbatim, 7.8.1, Office2:
logs/DEV-E8-reload-nochange.log:168-267; 7.7.1's twin islogs/p771/DEV-E8-reload-nochange.log:166-265, sameshape,
137.30s,gen 2at +207 ms. Zeroautoplay not applied, zerocorrection complete without a rebuild, andthe playhead is carried across the rebuild rather than lost. One grep note in passing, because it caught us:
no option changematches three lines in each of those slices and only one of them is yours — the other twoare our own rig's armed and firing notes, whose prose quotes the literal. The engine emits it once.
What we have done with the return value: nothing yet, and that is a choice we are naming rather than hiding.
Our
correctLoadOptionstill discards theSessionOptionCorrectionOutcomeattry await engine.reloadAtCurrentPosition(applying: change)and hands its callers a bareBool, so thedoneline above —and the post-rebuild epilogue under it (
installedOnce, a 15 s track-apply deadline, a rate re-assertion,engine.play()where the viewer has not paused, and on live anonLiveRebuiltthat re-arms our DVR anchors) — runsafter a session that never went down. None of our three product call sites names
autoplay, so only the QA rigreaches that branch today and nothing viewer-facing is wrong; it becomes reachable the moment a caller names a
sessionOwnedFieldsmember, andautoplayis still the only one(
AetherEngine+ReloadWithOptions.swift:282at 7.8.1). The adoption is written — a typedapplied/sessionOwned/rebuiltresult, the no-teardown answer given its own line and skipping that epilogue — and against the commit itwas written on it applied cleanly and parsed (
swiftc -frontend -parse, zero diagnostics). It has never beencompiled, and it is unapplied: two later edits of ours to the same file — one to
correctLoadOption's owncomments, and the second fix below — changed the lines it was written against, so it no longer applies cleanly
and will need re-cutting before it lands. We will say when it does.
3. Two on our side of the same mechanism, and both are ours
Neither is an engine finding. We report them because they are both in the same seam as this issue and because the
second one only became visible after the first was fixed.
E8-F1 — we read your rebuild's route park as a capability answer, and dropped a press for it
On
.loopbacka second press arriving inside our own #460 correction was thrown away, with a reason borrowedfrom the wrong question. Measured on our 7.7.1 build, Office2, two presses 43 ms apart
(
logs/p771/DEV-E8-audiosync-loopback-stepped40.log)::163,:166,:194,:222,:285. The route was blank for 131 ms and the press landed 35 ms into it. Ourpolicy put
"none"in anunavailableRoutesset — correctly derived from your ownAudioDelayPolicy.application(for:), which maps.noneto.unavailable(AudioDelayPolicy.swift:67) — and thenasked that question of a live reading of
videoRouteduring a rebuild we had raised ourselves.VideoRoute.none's own documentation says what it is: "Nothing loaded, or the session was torn down"(
PlayerState.swift:54-55). It is a park reading, not a route, and a decision that treats it as a capability willdrop a viewer's press. Two presses inside 131 ms is a held remote, not an exotic case. Fixed by asking about the
last settled route; the press is now recorded and delivered by the coalescer we already had. The 150 ms control
behaved at both pins and still does —
DEV-E8-audiosync-loopback-stepped150.logunderlogs/p771/and underlogs/, mount seeks300.00 → 312.80 → 312.31in each, two corrections,applied 100ms (asked 100). Across all 385 retained slices there is exactly oneaudio delay stood downline — that one — and none at 7.8.1. The before is a 7.7.1 build and the after a 7.8.1one, so that pair is not single-variable; the engine is not implicated either way, the whole defect being in our
reading of a value you publish correctly.
E8-F4 — and then our follow-up correction restarted the film, while our own oracle passed
With the press no longer dropped, the coalescer issued its second correction 1 ms after the first returned —
and the freshly mounted host had not yet published a position. 7.8.1, Office2
(
logs/DEV-E8-audiosync-loopback-stepped40.log)::214,:219,:223,:284,:312,:318. The delay value is right; the viewer is back at the opening credits,and — by our reading of our own progress reporting, not by a measurement — the server's resume point follows. Note the last line: our own application oracle passed on every run that did
this, because an oracle that watches the value cannot see a lost position. Three legs on two builds of ours did it
— four restarts in all, the two-press leg above, a second two-press leg
(
DEV-E8-f1-stepped40.prev-010705.log:280) and a five-press one twice(
DEV-E8-f1-burst20.prev-011813.log:287,:357) — before anybody read the mount seeks. The 150 ms control neverdid it on any build or either pin: four retained
stepped150slices, third mount312.31sin all four. (Theirsecond mount reads
312.80sin three of the four and312.70sin one —logs/DEV-E8-f1-stepped150.log:214—which is where the playhead was, not the defect; the defect is a mount at
0.00s.)The engine-side mechanism, stated as information and not as a report, because the window is ours. At 7.8.1
reloadAtCurrentPosition()takes its position frompositionForSessionRebuild(AetherEngine.swift:4839over:3171-3173), whose guard is scoped to a load still in flight —guard state == .loading, let parked = underReconstruction else { return clock }(:2477-2480) — while the autostart at the tail ofload()has alreadywritten
state = .playingbefore returning (:4631-4639) andload()itself zeroedclock.currentTime(
:3608);LiveReloadPolicy.resumePositionthen turns that 0 intonil(LiveReloadPolicy.swift:12-15, consumedat
AetherEngine.swift:4863-4864). So AE#464 round 2's guard covers the window before a load returns, and were-entered in the window immediately after one returned. We are not filing this: the position cannot be
stated by a correction anyway —
reloadAtCurrentPosition(applying:)takes only theLoadOptionsclosure andLoadOptionscarries no start position — so it has to be waited for, which is what we did. Our follow-up now holdsuntil the rebuilt session's clock reads a playhead (50 ms poll, 3 s cap, threshold 1 s, which is
resumePosition'sown boundary so the predicate asks the question you are about to ask). Measured on Office2 at 7.8.1:
logs/DEV-E8-f1-stepped40.log:214,:250,:251,:305,:347. Five presses (logs/DEV-E8-f1-burst20.log) at an achieved 35, 22, 22 and21 ms — the token asked for 20, and §1's caveat about that applies here too — collapse the same way: four
coalesced (
:180,:200,:249,:252), one hold (:253), two corrections (:163,:254),applied 250ms (asked 250)(:343), everymount seek at the playhead. If it is worth a sentence in
docs/api.mdbesidereloadAtCurrentPosition(applying:)that a correction raised immediately after one returns will rebuild at the head,that is your call and not an ask.
4. Round 4, point by point
"The human-cadence arm with
audiostep=<ms>is the one leg I would still like to see, since it is the only onethat reaches the catch-up pass at all." Run, on both instruments — and it is not the human-cadence arm that
reaches it. At 150 ms and 400 ms nothing folds and nothing catches up: three presses, three complete re-anchors,
three
in effectlines, at both E-8 pins. The catch-up is reached by a press landing inside a re-anchor after theTask has read
delivered, a band whose width is that re-anchor's own duration — 54–65 ms on the simulator, 87–88 mson the Apple TV at 7.8.1. §1 has the leg, the arc and the boundary. The wrong half of that sentence is ours: we wrote "the
catch-up is for human cadence" in round 3.
"On (a), the count note is worth keeping … A count bound to
AE#464: audio delayalone therefore doubles … theon the software pathsentence is the stable one." Re-confirmed at two more pins, 7.7.1 and 7.8.1, over the 383 slices that ran on them: the prefix isthe exact sum of the two sentences in every corpus (§1's table). We have kept our own counts bound to the sentence.
"the partition is returned rather than logged at, and a correction the session decides for itself no longer buys a
teardown." The second half retested on hardware and on the simulator, at 7.7.1 and 7.8.1, against the 7.1.3
control: 220 ms and a second native host become 4 ms and none, the no-change control still rebuilds and reports
itself, and a paused session no longer pays a rebuild either. §2 has the table. The first half we have not
exercised: our call site still discards the returned outcome, so every measurement in §2's retest is read off the
log — your engine's lines and our own — rather than off the outcome; §2 says what that costs us today and that the patch is written and unapplied.
"On (d), that is a measurement and I am taking it as one … Nothing owed on your side for it." Re-confirmed
rather than left: across all 385 retained E-8 slices (383 at 7.7.1 and 7.8.1, two 7.1.3 controls),
…not the engine's to move (route=…)is0 and
set while the session is being rebuiltis 0, as arecannot be rebuilt in placeandcannot re-anchor at the playhead. The structural reason is unchanged on both of our routes."And thank you for the retraction on
autoplay." Noted; nothing owed."Released in 7.5.0 (
87710cd6). Both consumers are on the new pin, so the round 4 behaviour is in the next buildfrom either." Our own builds are past it too — 7.7.1 and 7.8.1. Every count and presence in §2's table is
identical between those two: the same two arms, the same absent
gen 2, oneNativeAVPlayerHostand one mount seek in each. Two cells differ and both are timings — thesimulator's
not applied/doneoffsets, 5–12 ms at 7.7.1 against 6–7 ms at 7.8.1 over two runs at each pin, and,one run per cell on Office2, the running session's own elapsed clock at the moment of the correction
(
t+19.91sagainstt+20.06s), which is how long each leg had been playing when our rig fired rather than anengine reading. We did not build 7.5.0 or 7.6.0, so we cannot say from our own evidence that the change landed
exactly there; only that it is present at 7.7.1 and that 7.1.3 does not have it.
Both retests pass, so this is closeable on your side whenever you like; the adoption is ours to land and is not a
reason to hold it open. Raw slices on request, as before — and if the §1 hardware session is of any use to #592, it
is a software-route sitting on the same 81 Mbps title, with a 133-tick
[SWDiag]series in each of its two runs.superuser404notfound commentedon Sep 23, 2026
Thank you for round 5, and especially for E8-F4. It is filed now, from this side: the window is the engine's, and the engine walks into it without any host's help.
E8-F4 is an engine defect, fixed in #611. Your reading of the mechanism is exact:
rebuildPositionhonoured the parked position only whilestate == .loading, the autostart at the tail ofload()writes.playingbefore the new host has published a position, and for about 50 ms the clock still reads the zeroload()wrote. What makes it ours rather than a host timing question is thatreanchorForAudioDelay's own catch-up pass starts in that exact millisecond: on.loopbackitsawait reanchor(self.positionForSessionRebuild, delivered)runs the moment the first rebuild returns. Your app never reaches that arm on.loopback(as §1 says, 0on the loopback pathlines in 385 slices), so it could not have shown up in your corpus. It shows up on the CLI with nothing but the public setter: twosetAudioDelaypresses 50 to 90 ms apart on a 300 s H.264 + AAC fixture gave#3 mount seek: item axis 0.00sandcutting seg0+on every run from @15050 to @15090.The fix: a
.playingor.pausedsession whose clock reads exactly the reset zero now answers with the parked position, and an accepted seek retires the parked value so a real seek to 0 is never overridden. After:#3 mount seek: item axis 14.90s/seg3+on every run in the same band. Control: load at 100 s, seek to 0, then a correction, and the rebuild mounts at0.00s, not at the 100 s the load was handed. Both runners ofswift testpass. Your 50 ms / 3 s hold stays harmless after this and can go whenever it suits you once the release carries it; I will say which release that is here.§1, the catch-up band. Taken as a measurement, and the correction is right: the pass is reached by a press landing inside a re-anchor, and human cadence never reaches it. The engine's own comment and
docs/api.mdboth repeated the "a stepper held down converges" reading from round 3, and both are rewritten in #611 to your band (54 to 65 ms simulator, 87 to 88 ms Apple TV) with the three shapes named. The intermediate value reaching the renderer ahead of the flush on.software(softwareHost?.setAudioDelayupstream of the fold guard) is intended: the newest value should reach newly decoded buffers as early as possible, and the re-anchor then removes the ones already committed to the old one. Your decision not to call the burst's one-versus-threein effectcount a pin difference matches my reading.§2, round 4 on hardware. Noted, including the paused arm, which I had not predicted either. The count note stays bound to
on the software path.§3, E8-F1. Agreed that
.noneis a park reading and not a capability. Nothing on the engine side there.I will keep this open until #611 is in a release, then close it. The unapplied
SessionOptionCorrectionOutcomeadoption is yours to land and not a reason to hold it open, as you say.superuser404notfound commentedon Sep 23, 2026
The E8-F4 fix from #611 is released in 7.15.1 (
b93f9c4b): a correction raised in the ~50 ms after a rebuild returns now keeps the playhead instead of mounting at 0.superuser404notfound commentedon Sep 23, 2026
Closing as promised: #611 shipped in 7.15.1, so every round of this thread is now in a release. The 50 ms / 3 s hold on your side can go whenever it suits you. Thank you for five rounds of measurements that kept correcting both sides, the catch-up band and E8-F4 included.
cmcpherson274 commentedon Sep 25, 2026
The note our last reply here promised: the
SessionOptionCorrectionOutcomeadoption has landed on our main (24 September, at 7.15.1). OurcorrectLoadOptionnow reads the typed outcome, runs its post-rebuild epilogue only onrebuilt=true, and appendsoutcome applied=[…] sessionOwned=[…] rebuilt=<bool>to itsoption correction doneline. On the Apple TV the round-4 answer readsapplied=[] sessionOwned=[autoplay] rebuilt=false, 1 ms after yourcorrection complete without a rebuildline [1], and the correction we make when the audio route drops readsapplied=[audioBridgeMode] sessionOwned=[] rebuilt=true[2]. Thank you for the typed answer; it is what lets our own line say when nothing was rebuilt.[1]
DEV-E9-post-g4-autoplay-p7151.log:174-175. [2] A test leg with display criteria suppressed, where the route dropped on its own:DEV-E9-esc4-h40-reinstall.log:146,:243.superuser404notfound commentedon Sep 26, 2026
Thank you for closing the loop. Good to see the typed outcome doing its job on the device:
rebuilt=falseone millisecond after the engine'scorrection complete without a rebuildline is exactly the agreement between the two logs that the type was meant to give, and the route-drop correction readingapplied=[audioBridgeMode] rebuilt=trueshows the other arm. Nothing further on the engine side here.