You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
xapu answers Opus decode with silence (no sound), and the default 15.6 ms timer step starves the title's audio thread #260
Game and package version: retail title, <package id> 1.0.2.1
GPU and driver: NVIDIA GeForce RTX 5070 Ti (16 GB), 616.92, 32-lane waves
Windows: Windows 11 Pro 26300
XCL: release builds of main. Run with XCL_NETWORK=0. Seen on d4f17ca.
What happens
During the intro, and with the green picture reported separately, the sound is choppy and jerky instead of continuous. XCL's log at start says the console's audio processor and its mixer are taken but do not run:
acphal: ApuCreateHeap(0x1c700000, 0x226e00) – the audio processor's memory is the process's
acphal: SHAPE contexts [0, 0, 0, 0, 350] (they do not run: no audio from the console's mixer)
acphal: audio processor connected (4096 commands, 4096 messages) – commands are acknowledged, nothing runs
acphal: DSP connected (128 streams) – its commands are taken, nothing runs
I have not yet confirmed whether the missing mixer is the cause, or whether it is timing (buffer starvation, the frame clock, CPU load from pipeline builds) in the XAudio2 path the sound does go through.
Plan (claiming this)
I am working on this: find the root cause first and post it here. If it turns out to be the console mixer not running, I will propose a split into small PRs here before writing it, since that is a larger feature.
report.json and xcl.log are not attached because they hold my file paths. I can paste any part that helps. No game files are attached.
Related, not a duplicate: #156 routes chad.dll XDsp to acphal.
AI-assisted: Claude Code (Claude Opus 5.5) wrote this issue from my runs.
Second machine on this: Ryzen 7 9800X3D, RTX 3060 Ti 8 GB (driver 32.0.16.1742), 32 GB, Windows 11, release 130a143 (main 9ab7d76 + a test-only PR), XCL_NETWORK=0, 90 s run, warm DXIL cache. The menu's audio is choppy here too.
What our run adds to the root-cause question - the sound is not going through the Windows XAudio2 path at all. report.json at the end of the run:
So XAudio2Create is never called by this title: everything audible comes from the title's own engine, and the only XCL-side clock it can see is the acphal channel's audio-frame message (128 samples @ 48 kHz = 2.667 ms). Buffer starvation / decode load in the XAudio2 path can be ruled out for this title; the frame clock and the missing SHAPE mixer are the two suspects left, as you wrote.
One detail in the frame clock worth a look (Channel::pop, hle/acphal.rs): when a frame is late by more than 8 frames (~21 ms), next_frame is floored at now - 8*FRAME, so the clock silently drops the backlog and the title's engine sees time jump. During the menu our GPU is busy (40x "console shaders in the PSO without a translation: mesh pipelines" warnings), so pops can easily be late by that much - each such jump would sound like a skip. A counter of dropped frames / max lateness in the channel would tell whether this actually fires; happy to measure that if it helps your split.
Not claiming the issue - yours. Just a second data point and a pointer.
AI use: GPT-6.2 Astra (API model selector) wrote this comment from our run's report.json and the source; the human contributor checked the numbers.
Update with the root cause. The choppy sound I reported was not this title. XCL plays no sound at all for it. I am correcting the issue title.
Setup: RTX 5070 Ti, driver 616.92, Ryzen 7 7700X, 32 GB, Windows 11 Pro 26300, release builds of main 9ab7d76, XCL_NETWORK=0.
Measured. A meter on the Windows audio sessions of every output device, read about every 15 ms (30 ms in the last run), over six runs: five of 48 to 112 s on 9ab7d76, and a sixth of 12 s on 9ab7d76 + #283 + #244.
The xcl session is open, with a peak of exactly 0 in every sample.
A browser playing a video on the same machine at the same time shows sound in its samples (peak 0.54).
So what I heard as choppy was most likely that browser.
Root cause: the console's Opus decoder (xapu) is answered with silence.
From ~19 s on, the title sends XApuEnqueueCommand Process commands: 960 frames at 48000 Hz, with 80–320 byte inputs starting 0xf8 / 0xfc (20 ms full-band Opus packets, first mono, then stereo). There are 1358 of them in 112 s.
hle/acphal.rsXApuEnqueueCommand (~641–661 on 9ab7d76) zeroes the output and reports it decoded.
The title never creates XAudio2: report.json shows audio.engines 0, which matches ryosen0's run above. It opens the Windows output device itself and mixes in its own code.
Ruled out for this title, at this stage:
The SHAPE mixer. The 350 contexts are allocated and never used: one audio-processor command in 112 s, and no PopMessage / GetNumMessages call at all.
The Channel::pop "late by more than 8 frames" floor (the pointer in the comment above). The title never calls it.
A second defect, which will make the sound choppy once it is decoded.
XCL's process runs at Windows' default 15.6 ms timer step. The title's decoder thread sleeps a few milliseconds between polls, so it asks for 17.2 packets a second where real time needs 50.
With a 1 ms timer step (a temporary test), it asks for exactly 50.0 a second: 302 in 6.04 s.
XCL only asks for a fine timer for its own frame clock (d3d12x/frame.rs).
Plan. Two small, generic PRs, in this order:
host: the title runs on a 1 ms timer step, asked for at start and given back at exit (~30 lines). The test measures 50 sleeps of 1 ms; at 15.6 ms a step they take ~780 ms.
changed the title [-]Retail GTA VI: intro sound is choppy (console audio processor and mixer do not run)[/-][+]xapu answers Opus decode with silence (no sound), and the default 15.6 ms timer step starves the title's audio thread[/+]on Nov 23, 2026
Ruled out as the cause here: console-only CPU instruction traps. With a counter added locally, MONITORX / MWAITX are emulated ~262,000 times in 110 s (65,000 in the first 3 s, then ~2,400/s) and INSERTQ once; at that rate the traps cost ~1–2 % of a core.
Not tested
Main without the PRs on this machine with a listening test; AMD; a meter on the audio session (heard by ear only).
AI use
Claude Code with Claude Opus 5.5: built the branches, ran the title, read the logs and wrote this report from those runs; the listening was done by me.
Activity
ryosen0 commentedon Nov 23, 2026
Second machine on this: Ryzen 7 9800X3D, RTX 3060 Ti 8 GB (driver 32.0.16.1742), 32 GB, Windows 11, release
130a143(main9ab7d76+ a test-only PR),XCL_NETWORK=0, 90 s run, warm DXIL cache. The menu's audio is choppy here too.What our run adds to the root-cause question - the sound is not going through the Windows XAudio2 path at all.
report.jsonat the end of the run:So
XAudio2Createis never called by this title: everything audible comes from the title's own engine, and the only XCL-side clock it can see is the acphal channel's audio-frame message (128 samples @ 48 kHz = 2.667 ms). Buffer starvation / decode load in the XAudio2 path can be ruled out for this title; the frame clock and the missing SHAPE mixer are the two suspects left, as you wrote.One detail in the frame clock worth a look (
Channel::pop,hle/acphal.rs): when a frame is late by more than 8 frames (~21 ms),next_frameis floored atnow - 8*FRAME, so the clock silently drops the backlog and the title's engine sees time jump. During the menu our GPU is busy (40x "console shaders in the PSO without a translation: mesh pipelines" warnings), so pops can easily be late by that much - each such jump would sound like a skip. A counter of dropped frames / max lateness in the channel would tell whether this actually fires; happy to measure that if it helps your split.Not claiming the issue - yours. Just a second data point and a pointer.
AI use: GPT-6.2 Astra (API model selector) wrote this comment from our run's report.json and the source; the human contributor checked the numbers.
mariuslozo-boop commentedon Nov 23, 2026
Update with the root cause. The choppy sound I reported was not this title. XCL plays no sound at all for it. I am correcting the issue title.
Setup: RTX 5070 Ti, driver 616.92, Ryzen 7 7700X, 32 GB, Windows 11 Pro 26300, release builds of main
9ab7d76,XCL_NETWORK=0.Measured. A meter on the Windows audio sessions of every output device, read about every 15 ms (30 ms in the last run), over six runs: five of 48 to 112 s on
9ab7d76, and a sixth of 12 s on9ab7d76+ #283 + #244.xclsession is open, with a peak of exactly 0 in every sample.Root cause: the console's Opus decoder (
xapu) is answered with silence.XApuEnqueueCommandProcess commands: 960 frames at 48000 Hz, with 80–320 byte inputs starting0xf8/0xfc(20 ms full-band Opus packets, first mono, then stereo). There are 1358 of them in 112 s.hle/acphal.rsXApuEnqueueCommand(~641–661 on9ab7d76) zeroes the output and reports it decoded.report.jsonshowsaudio.engines 0, which matches ryosen0's run above. It opens the Windows output device itself and mixes in its own code.Ruled out for this title, at this stage:
PopMessage/GetNumMessagescall at all.Channel::pop"late by more than 8 frames" floor (the pointer in the comment above). The title never calls it.A second defect, which will make the sound choppy once it is decoded.
d3d12x/frame.rs).Plan. Two small, generic PRs, in this order:
0xfc, are 320 bytes and fill 7,680-byte outputs (about 62 s in). Without item 1, the title on Windows asks for only 17.2 packets a second, so its sound would be choppy there.No open PR covers the timer step (searched: timer resolution,
timeBeginPeriod). #294 covers the decoder.@ryosen0, could you check whether the choppy menu sound you heard stays when
xcl.exeis muted in the Windows volume mixer?AI-assisted: Claude Code. Claude Fable 5.2 did the investigation and measurements; Claude Opus 5.5 wrote this comment.
[-]Retail GTA VI: intro sound is choppy (console audio processor and mixer do not run)[/-][+]xapu answers Opus decode with silence (no sound), and the default 15.6 ms timer step starves the title's audio thread[/+]mastrr9 commentedon Nov 23, 2026
Quick coordination pointer linking the two open PRs on this issue (#300 and #294):
kernelx::fine_timer, 0.5 ms resolution +IGNORE_TIMER_RESOLUTIONopt-out) confirmed that GTA VI mixes on the CPU and outputs its final mix via Windows Spatial Audio (ISpatialAudioClient) — and two additional Windows testers (kernelx: the finest system timer for the title (choppy audio, #260) #300 and xapu: decode the title's Opus packets and play them on the PC (retail title's sound) #294 comments) confirmed continuous audio with kernelx: the finest system timer for the title (choppy audio, #260) #300 applied. (Note: kernelx: the finest system timer for the title (choppy audio, #260) #300 currently saysFixes #260, which would auto-close this issue before xapu: decode the title's Opus packets and play them on the PC (retail title's sound) #294 merges.)xapuOpus packets intop.output, and also plays them directly via a separate XAudio2console_pcmvoice (added because xapu: decode the title's Opus packets and play them on the PC (retail title's sound) #294 was developed on Wine, where the title'sISpatialAudioClientpath wasn't observed). Once kernelx: the finest system timer for the title (choppy audio, #260) #300 + xapu: decode the title's Opus packets and play them on the PC (retail title's sound) #294 are tested together on Windows, it's worth checking whetherp.outputalready plays cleanly throughISpatialAudioClientsoconsole_pcmdoesn't double-play decodedxapuaudio on Windows (and can be gated behind an opt-in flag for Wine / SHAPE-only titles).(AI-assisted — Gemini 4 Neon; code inspection only, no game files)
woreksami commentedon Nov 24, 2026
Windows test with #300, #468 and #503 together: the sound is still choppy here, and the title feeds
xapuonly once.Tested
XCL_NETWORK=0main508a0c7 + D3D12.X: bound driver PSO compile concurrency and surface stage progress (#156) #214 (960162e) + D3D12.X: a slow graphics pipeline waits at most 4 s once per build (#232) #267 (043d1f7) + kernelx: the finest system timer for the title (choppy audio, #260) #300 (9507d05) + Opus: prefer length-prefixed framing, fix 6.1 mapping, harden MFT (#327) #503 (78f5510) + acphal: audio frame deadlines are exact 1/375 s per frame index #468 (0d407cf), withXCL_PSO_WAIT_MS=150andXCL_DXC_THREADS=4.timer: finest resolution for the title (was 15.62 ms, now 0.50 ms).xapuis fed once per run:1 Opus packets decoded (0 errors), 648 frames, 644 non-zero samplesat ~18–28 s, and no further line in 2–6 minute runs (four runs, same result). Retail title (Xbox Series 1.0.2.1) reaches actual gameplay on RDNA3 — then 0xC0000005 in the title (+0x23cf683) #534 on RDNA3 shows5,521 packets decodedfor comparison, so here the title stops sending Process commands after the first packet; it is not the decoder failing.MONITORX/MWAITXare emulated ~262,000 times in 110 s (65,000 in the first 3 s, then ~2,400/s) andINSERTQonce; at that rate the traps cost ~1–2 % of a core.Not tested
AI use
kernelx: the finest system timer for the title (choppy audio, #260)
Merge pull request #300 from AAigars/kernelx-timer-resolution
woreksami commentedon Nov 24, 2026
This was closed by the merge of #300. On my machine #300 did not make the sound continuous; #456 did.
main.So for anyone still hearing choppy sound on current
main: #456 is the one to try.AI use: Claude Code with Claude Opus 5.5 wrote this from my test runs; the listening was done by me.