mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:45:53 +01:00
[PR #277] runtime/shims: implement xapu.dll and chad.dll audio processor shims #328
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#328
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/277
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:old-pr/10008📝 Commits (1)
067c048runtime/shims: implement xapu.dll and chad.dll audio processor shims📊 Changes
5 files changed (+375 additions, -2 deletions)
View changed files
📝
runtime/CMakeLists.txt(+15 -0)📝
runtime/shims/registry.cpp(+9 -0)➕
runtime/shims/xapu_chad.cpp(+227 -0)➕
runtime/test/xapu_chad_test.cpp(+122 -0)📝
scripts/build_runtime.ps1(+2 -2)📄 Description
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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.