mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:55:52 +01:00
[PR #2044] [MERGED] xapu: decode Opus packets through a Rust sidecar (RT-XAPU-OPUS-DECODE) #2050
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#2050
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/2044
Author: @BubsMcgee
Created: 11/25/2026
Status: ✅ Merged
Merged: 11/26/2026
Merged by: @aslan2142
Base:
main← Head:rt-xapu-opus📝 Commits (6)
9c6cbbcruntime: xapu.dll as a command queue with the console's layouts, audio silent370e52bMerge branch 'main' of https://github.com/ubiquitarianism/leonida into xapu-connect-layouts19559fescripts: build xapu.cpp in the cl.exe fallback (review of #1144)6ee7ef8Merge branch 'main' of https://github.com/ubiquitarianism/leonida into xapu-connect-layoutsa5dd540xapu: decode Opus packets through runtime/opus_decoder (RT-XAPU-OPUS-DECODE)4cfbdfcMerge remote-tracking branch 'origin/main' into rt-xapu-opus-on-1144📊 Changes
14 files changed (+1340 additions, -172 deletions)
View changed files
📝
docs/audio_hal_exe_calls.md(+20 -0)📝
docs/runtime_imports.md(+14 -12)📝
runtime/CMakeLists.txt(+72 -1)➕
runtime/cmake/opus_decoder.cmake(+23 -0)➕
runtime/opus_decoder/Cargo.lock(+16 -0)➕
runtime/opus_decoder/Cargo.toml(+16 -0)➕
runtime/opus_decoder/README.md(+33 -0)➕
runtime/opus_decoder/leonida_opus_decoder.h(+44 -0)➕
runtime/opus_decoder/src/lib.rs(+244 -0)📝
runtime/shims/xapu_chad.cpp(+5 -118)➕
runtime/shims/xapu_queue.cpp(+438 -0)📝
runtime/test/xapu_chad_test.cpp(+221 -40)➕
runtime/test/xapu_opus_test.cpp(+193 -0)📝
scripts/build_runtime.ps1(+1 -1)📄 Description
Claimed as RT-XAPU-OPUS-DECODE (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7170709281).
Depends on: #1144 (RT-XAPU-CONNECT-LAYOUTS). The branch is stacked on #1144 and also merges
main(b9320a118): the #1144 head predates a slot-133kernel_writesfix and crashed early in a retail boot without it. When #1144 lands, this reduces to the decoder alone.What and why
#1144 keeps the xapu command queue and layouts and leaves
fill_silence()for a decoder; this wires one in:runtime/opus_decoder: a Rust C-ABI crate over BSD-3-Clauseopus-pure, built by cargo likeruntime/xma_decoder(-DLEONIDA_REQUIRE_OPUS_DECODER=ONrequires it;-DLEONIDA_OPUS_DECODER_LIB=<path>links a prebuilt one).xapu_queue.cpp::fill()decodes each process packet into f32 PCM, honouringfirst_frame,frame_count,output_bytesand the deinterleaved option; without cargo it keeps the table-of-contents frame count and silence.The layouts stay #1144's (credited to Marvisak/VIctory
apu.rs, GPL-3.0-or-later); no VIctory source is copied, and the new files use leonida names.Tested
xapu_opus(new): 29/29. A generated 440 Hz stereo packet decodes to 960 frames / 0x1E00 bytes with energy;first_frame/frame_count/output_bytesclipping; empty, null and stray-stream errors; deactivate and reactivate.xapu_chad(#1144's): passes unchanged (layouts + silent path).acphal,acphal_noncached_only,xapu_chad,xapu_opus,xapu: 5/5 CTest.d, 1905 presents, 32/32 non-black, no faults. The runtime logsxapu: connected for Opus decoding, 256 streams; packets decoded. RTX 3080 Ti, NVIDIA 616.64, Windows 11.Notes
mainmerge is only for the slot-133 fix; it can be dropped on rebase after #1144 lands.xapu.cppis the legacy test-only shim; the runtime serves xapu fromxapu_queue.cpp(#1144) and chad fromxapu_chad.cpp.AI-assisted.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.