Repository navigation
Conversation
This was referenced Nov 24, 2026
Collaborator
Author
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.
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Clean-room shims for the remaining Xbox Series audio hardware DLLs:
xapu.dll(5 imports) andchad.dll(5 imports), backed by static ABI inspection of all 13 call sites.What changed
runtime/shims/xapu_chad.cppwith constant-initializedSRWLOCKsession registries (0_Init_thread_headerTLS guards):xapu.dll:XApuConnect,XApuDisconnect,XApuEnqueueCommand,XApuGetResultCount,XApuDequeueResult. Tracks valid queue handles and echoes FIFO 56-byte result packets (opcode,context_index, andoutput_bytesfor decode commands) so callers advance context states and recycle slots cleanly, failing closed (HRESULT_FROM_WIN32(ERROR_NO_MORE_ITEMS)) when empty andERROR_INVALID_HANDLEon stale handles.chad.dll:XDspConnectWithMaximumStreamLimit,XDspActivate,XDspDeactivate,XDspDisconnect,XDspSubmitCommand. Validates handle lifetime,max_streams > 0, and non-null command buffers; returnsS_OK(0) so stream setup and command submission succeed cleanly.xapu.dllandchad.dllReturnClass::HResultentries toruntime/shims/registry.cpp.runtime/test/xapu_chad_test.cppand wiredxapu_chad_test/xapu_chad.cppinruntime/CMakeLists.txtandscripts/build_runtime.ps1.Verification
xapu_chad_test(cmake --build runtime/build --target xapu_chad_test): 0 warnings.ctest --test-dir runtime/build -R "^xapu_chad$" --output-on-failure:1/1passed.dumpbin /symbolsonxapu_chad.cpp.obj:0_Init_thread_headerreferences.python -m unittest tests/test_ctest_registration.py:4/4OK.python scripts/check_no_game_data.py&git diff --check: clean.Claim: https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7116975037