Repository navigation
fix(audio): serialize track rebuilds and preserve transport intent - #711
Conversation
…rebuild #711 documented the new contract under "Public but not host API" while the Audio table still promised 0.5 to 1 s of black on every switch. The row now carries the contract itself: native handover keeps the old item mounted, rapid picks coalesce, stop/load drop queued work, and a play/pause during the rebuild decides its final transport. Follow-up to #711. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
|
Thanks, merged. Coalescing the picks fixes a real gap: a second pick during a rebuild used to race the first one's generation check. One follow-up landed on top (b64ff7e): the API reference now states the new contract in the |
…t comes back #711 parked the transport for an audio pick in a field of its own, beside transportIntentUnderReconstruction (AE#464 round 3), so a press during a disc-title switch, reloadAtCurrentPosition or an engine-raised rebuild was still lost: the rebuild came back in the state it started from. play() and pause() now write the existing field while sessionPreservingReloadInFlight holds (not while .loading, which play() itself leaves), reloadWithAudioOverride settles from it, and the URL branch of reloadAtCurrentPosition replays it after load() returns. audioSelectionTransportIntent is gone. Covered end to end on both branches: a pause during an audio rebuild and during a URL reload holds, a play during a custom-source reload holds, and a press outside a rebuild parks nothing. All four fail without the change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
…d transport, yucelokan's #708-#711 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
|
Released in 7.29.0. Two things grew out of this one in the same release: a play or pause during the rebuild is now honoured for every session rebuild ( |
superuser404notfound#711 keeps the outgoing item mounted while the source reopens, but replaceCurrentItem still drops the AVPlayerLayer to black until the new item decodes its first frame, and on device that read as a flash on every switch. The rebuild now reads the frame on screen from the paused item (NativeAVPlayerHost.captureDisplayedFrame, ~20 ms paused; a playing item needs ~300 ms before a fresh output sees anything, which is why it reads after the pause) and lays it over the hosted layer on the bound AetherPlayerView as a one-sample AVSampleBufferDisplayLayer, so an HDR frame goes through its colour attachments as the software path's frames do. It comes down when the next host session reports isVideoReadyForDisplay, on stop, load, a failed or superseded rebuild, unbind, or after 8 s. Skipped for Dolby Vision (the output vends the base layer, which has no displayable colour of its own for Profile 5), PiP and external playback. Covered on a generated 4 s H.264 + AAC file: a playing and a paused item hand over a frame, an audio rebuild holds the picture and releases it on the next item's first frame (red with the hold disabled), stop takes it down, and the skip rules. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
Summary
Coalesce rapid audio selections into one rebuild at a time and preserve the latest play/pause command across asynchronous reopen. Invalidate pending selections on stop or a new load.
What changed
Test plan
swift test --jobs 4 --filter 'AudioSelectionOwnershipTests|Issue464|Issue357|CancellableLoadTests|PublicAPIDocumentationTests|DocumentedConstantsTests'passed: 24 XCTest cases and 97 Swift Testing cases.swift build --jobs 4, documentation links andgit diff --checkpass.Checklist
CHANGELOG.mdupdatedfeat(...),fix(...),chore(...))