Repository navigation
Conversation
…none Under Wine (CrossOver 26.3), GetState on a decoded (XMA / Opus) source voice that has buffers queued but has not started returns BuffersQueued = 2 and pCurrentBufferContext = NULL. Windows names the first queued buffer there, and xma2_source_voice_decodes_and_manages_lifetime checks for it (left 0, right 0x3003). XCL submits its decoded buffers with a non-null token as the context, so a null current context with buffers queued means the host did not say. Each decoded buffer now carries its submission number, and GetState names the oldest one that has not ended. When the host returns a context, the mapping is unchanged, so Windows is not affected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Upstream PR xcl-dev#890 was closed or merged. |
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.
Under Wine (CrossOver 26.3),
GetStateon a decoded (XMA / Opus) source voice that has buffers queued but has not started returnsBuffersQueued = 2andpCurrentBufferContext = NULL; Windows names the first queued buffer.hle::xaudio2::tests::xma2_source_voice_decodes_and_manages_lifetimechecks for that and fails under Wine (left: 0, right: 12291=0x3003). Reported in xcl-dev#258 (comment).XCL submits its decoded buffers with a non-null token as the context, so a null current context with buffers queued means the host did not say. When that happens,
GetStatenow names the oldest of the voice's buffers that has not ended. When the host returns a context, the mapping is unchanged, so this does nothing on Windows.What is in it
crates/xcl/src/hle/xaudio2.rs:DecodedBuffergets a submission number (NEXT_BUFFER_SEQ);get_statefalls back to the oldest live buffer when the host's current context is null andBuffersQueued != 0. +16 / -2, one commit.Tested
x86_64-pc-windows-msvcwith clang-cl / lld-link 23.1.6 and an xwin SDK 10.0.26100, Rust 1.100.0, debug. The test binary was run under Wine;mainisbeaa245, the head is this PR's commit (the runs were made before a comment-only edit to the new comment).xcl-<hash>.exe hle::xaudio2:: --test-threads=1, 3 runs each:main8 passed, 1 failed (this test) every run; head 9 passed, 0 failed every run.hle::with--skip ::gpu_on the head (skipping the 3 tests below that crash this host onmaintoo): 278 passed, 3 failed, 2 ignored; this test passes. The 3 failures fail onmainas well.--skip ::gpu_ --test-threads=1, restarted past each crash),mainvs head: 571 / 5 / 20 and 572 / 5 / 20 (passed / failed / ignored); no other test changed outcome apart from two that are flaky on this host (cpu_writes::tests::writes_land_after_the_queuefailed once onmainand passed on reruns;vram::tests::d32s8_targets_take_their_own_size_of_video_memorycrashed in themainrun and not in the head's). In this whole-lib run the head still fails this test, later on: afterGetStateit gets no buffer callbacks within the test's 3 s (STARTED0). It passes alone and in thehle::run above; the whole-lib run took 636 s under Rosetta, so I read it as the audio thread being late, not confirmed.mainand head (as reported in [upstream #1898] Direct DXIL: truncate s instead of returning native on special values in round_exact #258):bind::tests::create_list_reset_and_clear_state_track_initial_pso_on_d3d12,title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels,vram::tests::d32s8_targets_take_their_own_size_of_video_memory.Tested by others (on head
76d2ff7)hle::xaudio2::tests pass, both lifetime tests run to completion (Opus through MSOpusDecoder). With the host's context cleared right after the call in a local build, the fallback returned the first submitted context for both codecs (0x1001 Opus, 0x3003 XMA2). XAudio2: GetState names the oldest queued buffer when the host gives none xcl-dev/xcl#890 (comment)main7 passed / 2 failed (the XMA2 test andopus_source_voice_decodes_and_manages_lifetime, the sameGetStatecheck), head 9 / 0, 3 runs each. XAudio2: GetState names the oldest queued buffer when the host gives none xcl-dev/xcl#890 (comment)main8 / 1, head 9 / 0, and head merged ontomain1ec4c98(no conflicts) 9 / 0, 3 runs each. XAudio2: GetState names the oldest queued buffer when the host gives none xcl-dev/xcl#890 (review)Regression run
xcl-smokepair (main and this head) from the Mac before taking this out of draft.Not tested
hle::xaudio2::tests ran on Windows, above); the GPU tests were not run for this PR.e2etest title's XAudio2 check (XMA2 GetState: ctx=0x0, queued=1under Wine, noted by @ClosetPie107).AI use
Mirror of xcl-dev#890 (auto-synced, do not edit).