Skip to content

fix(audio-delay): a rebuild raised the moment one returned keeps the playhead (AE#464 round 5) - #611

Merged
superuser404notfound merged 1 commit into
mainfrom
fix/464-rebuild-after-load
Sep 23, 2026
Merged

superuser404notfound merged 1 commit into
mainfrom
fix/464-rebuild-after-load

Conversation

@superuser404notfound

Copy link
Copy Markdown
Owner

Refs #464 (round 5, reporter's E8-F4).

Defect

rebuildPosition honoured the parked position only while state == .loading. The autostart at the tail of load() writes .playing before the new host has published a position, so for ~50 ms the clock still reads the zero load() wrote. A correction raised in that window rebuilt at the head. setAudioDelay's own catch-up pass starts exactly there, and a second setAudioDelay press 50 to 90 ms after the first on .loopback lands there too.

Fix

  • rebuildPosition: a .playing / .paused session whose clock reads exactly the reset zero answers with the parked position.
  • seek(to:origin:): an accepted seek retires the parked position, so a real seek to 0 is not overridden.

Measured (aetherctl, 300 s H.264 + AAC, M1)

second press before after
@15050 to @15090 #3 mount seek: item axis 0.00s, cutting seg0+ (5 of 5) 14.80s / 14.90s, seg3+ (5 of 5)
@15150 n/a 14.80s, seg3+

Control: --start-position 100, seek to 0, then a correction: the rebuild mounts at 0.00s, not at the parked 100 s (2 of 2).

swift test: 629 XCTest (1 skipped) and 3358 swift-testing, all passed.

Docs: docs/api.md (catch-up band, post-return window), docs/cli.md (round 5 harness).

🤖 Generated with Claude Code

https://claude.ai/code/session_014AVNwe8YDG9EQM7uHdjT3f

…playhead (AE#464 round 5)

`rebuildPosition` honoured the parked position only while `state == .loading`,
but the autostart at the tail of `load()` writes `.playing` before the new host
has published a position. For the next ~50 ms the clock still reads the zero
`load()` wrote, so a correction raised the moment a rebuild returned rebuilt the
session at its head. `setAudioDelay`'s own catch-up pass sits exactly in that
window, and so does a second stepper press 50-90 ms after the first on
`.loopback`.

A playable session whose clock reads exactly the reset zero now answers with the
parked position. An accepted seek retires the parked value, so a genuine seek to
0 is never overridden.

Measured with aetherctl (300 s H.264 + AAC, two presses 50-90 ms apart):
before `#3 mount seek: item axis 0.00s` / `cutting seg0+` on every run, after
`14.90s` / `seg3+` on every run. Control: load at 100 s, seek to 0, correct:
the rebuild mounts at 0.00s.

Reported by cmcpherson274 as E8-F4 (information, not filed).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_014AVNwe8YDG9EQM7uHdjT3f
@superuser404notfound
superuser404notfound merged commit 3fbddc1 into main Sep 23, 2026
7 checks passed
@superuser404notfound
superuser404notfound deleted the fix/464-rebuild-after-load branch September 23, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant