xapu answers Opus decode with silence (no sound), and the default 15.6 ms timer step starves the title's audio thread #260
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#260
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@mariuslozo-boop on GitHub · 2026-11-23 22:03 UTC · original
Game and package version: retail title,
<package id>1.0.2.1GPU 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 ond4f17ca.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:
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.dllXDsp toacphal.AI-assisted: Claude Code (Claude Opus 5.5) wrote this issue from my runs.
@ryosen0 on GitHub · 2026-11-23 22:21 UTC · original
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 on GitHub · 2026-11-23 22:41 UTC · original
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.
@mastrr9 on GitHub · 2026-11-23 23:12 UTC · original
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 (#300 and #294 comments) confirmed continuous audio with #300 applied. (Note: #300 currently saysFixes #260, which would auto-close this issue before #294 merges.)xapuOpus packets intop.output, and also plays them directly via a separate XAudio2console_pcmvoice (added because #294 was developed on Wine, where the title'sISpatialAudioClientpath wasn't observed). Once #300 + #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 on GitHub · 2026-11-24 01:39 UTC · original
Windows test with #300, #468 and #503 together: the sound is still choppy here, and the title feeds
xapuonly once.Tested
XCL_NETWORK=0main508a0c7+ #214 (960162e) + #267 (043d1f7) + #300 (9507d05) + #503 (78f5510) + #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). #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
@woreksami on GitHub · 2026-11-24 02:31 UTC · original
This was closed by the merge of #300. On my machine #300 did not make the sound continuous; #456 did.
9507d05), alone and together with #468 and #503: still choppy, details in my comment above.017515c) to that tree: the sound was continuous through the menus and the loading screen in three runs (by ear). Report: https://github.com/ivall/xcl/pull/456#issuecomment-7119946326main.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.