Repository navigation
Preserve live audio through run-ahead and long guest frames - #216
Merged
Merged
Conversation
mstan
marked this pull request as ready for review
October 26, 2026 16:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Run-ahead rollback was resetting the live resampler and restoring the PCM ring with disjoint lock scopes. Speculative DSP work could also publish future PCM. Preserve live delivery atomically during rollback, keep speculative suppression active through undo, and synthesize speculative cycles without publishing PCM.
Long guest intervals such as Super Metroid's pause restoration could produce a FIFO-sized audio burst and then starve the callback during the host wait. Use the same bounded APU catch-up helper at CPU-port and final-frame synchronization, reusing existing producer backpressure between slices. Preserve total guest cycles, the existing1<<20-cycle cap and portable fallback; do not enlarge the FIFO or shorten the game's original restoration timing.
Validation at afe5656:
Owner gameplay/audio handoff remains before merge. Actual Steam Deck ordinary-gameplay crackling is not certified by these Windows checks.
Owner accepted the combined cb85d33 visual/gameplay handoff on 2026-10-26 and explicitly requested merge. Combined regression: MMX 23 executed CTests pass (2 optional Saber fixtures skipped), MMX and SMW normal movement plus same/fresh-process current-build save/load pass; Windows Super Metroid 16/16 tests and real Options Exit 0 with config/SRAM persistence pass. Existing matched runtime evidence remains valid. Steam Deck hardware is unavailable and has no hardware-audio pass.