Repository navigation
Conversation
The default mix counters aggregate about a minute, which made it hard to match the silent opening shots in Ocarina of Time to renderer output. DM_AUDREN_TRACE now timestamps each 200-render window and separates nonzero output, all-zero output and renders without a captured mix. The usual counters are unchanged. The Mac host built, the audio layout, work-buffer and device tests passed, and a run of Ocarina of Time produced 205 consecutive windows whose three counters accounted for every render.
nufegia
marked this pull request as ready for review
November 8, 2026 02:59
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.
What and why
The default audio renderer mix counters aggregate about a minute. That made it hard to tell whether a particular shot in the Ocarina of Time opening received a silent mix or whether the host audio device ran out of samples.
With
DM_AUDREN_TRACEset, each renderer now logs a timestamp and counts for every 200 renders (about one second). The counts distinguish nonzero mixes, all-zero mixes and renders without a captured mix. The trace records counts and timings. The existing default counters and playback behavior are unchanged.Related to #1501. On the M1 Pro test below, the Ganondorf horseback shot fell inside a digitally silent mix span. Waveform matching located the corresponding sound about 35.5 seconds before the image. AudioOut reported zero underruns in 70,000 callbacks. A separate experiment with #1331 and #1379 reduced the extended silence but left about four seconds of audio delay at a sampled horseback shot. The synchronization bug remains open.
Checked
c8bfa161plus this change. Theaudren-layout,audren-workandaudio-devicetargets and the documentation and environment-switch tests passed.0400486024DEC000, v131072), M1 Pro 16 GB, macOS 27.2, Xcode 27.2. The live diagnostic was checked using matching libraries from the older4861fb03partial build and the experimental NDVE bypass. All 205 consecutive windows accounted for all 200 renders. The audio-renderer source before this change was identical at both revisions.010015100B514000) quick regression passed on the same M1 Pro. Comparedc8bfa161b670with4d7d5bed2e6aon the same 65-second opening route. Both runs reached the frame target (3,449 and 3,510 frames). Both reported 59.3 fps, all 16,268 shaders built in both, and the PR introduced no new error types. This is the available local game with a smoke route that uses the same audio renderer.CI follow-up (2026-11-08)
The reviewed head remains
4d7d5bed2e6a, based onc8bfa161; this follow-up changes no source code, does not rebase onto newer main, and does not claim all-green CI.dm/host/hle_audren.c: 0 findings. The failed ratchet is inherited from the base, not a new diagnostic in the modified audio source.SeenShaders.test_shader_watch_counts_the_list(ShaderWatchconstructor signature mismatch) and the six graphics/derived variants ofXcodePipelineTests.test_prepare_preserves_upstream_options_and_graphics_paths(missing fixtureRomFS.img). Running exactly those two test methods locally on cleanc8bfa161and on4d7d5bedreproduces the same seven errors. The affected tests and packer source are unchanged by this PR.Reproduction of the inherited tool failures (run at each revision with the project's Python environment):
No additional game regression was run for this follow-up. The report below is the existing quick regression on the exact PR head; it does not represent a new run or broader game coverage. The audio/video synchronization defect remains outside this diagnostic change.
Docs
Existing quick regression report on the PR head
regress.py check (quick): PASS
Baseline
origin/mainc8bfa16, candidateHEAD4d7d5be; Apple M1 Pro, macOS 27.2, Xcode 27.2; 1128.2 s010015100B514000Super Mario Bros. Wonder
010015100B514000: PASS