Skip to content

xapu answers Opus decode with silence (no sound), and the default 15.6 ms timer step starves the title's audio thread #260

Done

Description

@mariuslozo-boop

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.

Activity

  1. ryosen0 commented on Nov 23, 2026

    @ryosen0
    Contributor

    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:

    audio: engines 0, mastering_voices 0, source_voices 0,
           xma_voices 0, xma_buffers_decoded 0, opus_voices 0, opus_buffers_decoded 0,
           silent_voices 0, buffers_silenced 0, unsupported_formats [], dropped_flags []
    

    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.

  2. mariuslozo-boop commented on Nov 23, 2026

    @mariuslozo-boop
    Author

    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.rs XApuEnqueueCommand (~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:

    1. 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.
    2. xapu: xapu: decode the title's Opus packets and play them on the PC (retail title's sound) #294 (simnJS) decodes these packets. I will test it on Windows here, on a long run, and report on xapu: decode the title's Opus packets and play them on the PC (retail title's sound) #294. I also saw stereo packets later in the run: they start 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.exe is 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.

  3. 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
  4. mastrr9 commented on Nov 23, 2026

    @mastrr9

    Quick coordination pointer linking the two open PRs on this issue (#300 and #294):

    (AI-assisted — Gemini 4 Neon; code inspection only, no game files)

  5. woreksami commented on Nov 24, 2026

    @woreksami

    Windows test with #300, #468 and #503 together: the sound is still choppy here, and the title feeds xapu only once.

    Tested

    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.
  6. woreksami commented on Nov 24, 2026

    @woreksami

    This was closed by the merge of #300. On my machine #300 did not make the sound continuous; #456 did.

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions