runtime: honor Opus activation, trimming and planar output #3084
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3084
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3084"
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?
@R0Y00 on GitHub · 2026-11-27 14:40 UTC · original
R0Y00:codex/local-opus-activation→main· +169 −26 · 3 files · 1 commits · merged 2026-11-27 22:01 UTCChange
Honor activation-time channel counts for typed Opus streams. Decode at 48 kHz, apply the requested leading-frame trim and output capacity, and publish the corresponding completion record. Stereo streams support planar and interleaved output.
Verification
Tested
74d6e222on x64 Windows with MSVC and libopus 1.5.2, configured with X2W_WITH_OPUS=ON.Both source-built tests passed, zero skips. The stereo fixture compares decoding to libopus, checks trimming 312 leading frames from a 960-frame packet, and verifies completion fields and output order. This verifies the stream interface; application playback still requires integration testing.
AI-assisted contribution.
@R0Y00 on GitHub · 2026-11-27 14:46 UTC · original
Release verification at
74d6e222with MSVC 19.51, x64 Windows and libopus 1.5.2 also passed. WithCMAKE_BUILD_TYPE=ReleaseandX2W_WITH_OPUS=ON,ctest --test-dir out/opus-rel --no-tests=error -R '^startup_xapu_(opus|queue)$' --output-on-failureran both tests, 2 passed, 0 failed, 0 skipped. The Debug build passed the same two fixtures.@R0Y00 on GitHub · 2026-11-27 14:47 UTC · original · reviewed
Separate integration test at
74d6e222withmainca659396(tree2bfb069f424c2d33fa82f962400ddb4de694cfde). Typed activation supplies the channel count, decode consumes the full Opus packet before trimming, and only the kept PCM and packed completion are written.With
-DX2W_WITH_OPUS=ON, MSVC x64, Windows 11 26200.9974 and libopus 1.5.2, I builtstartup_stub_xapu startup_xapu_opus_check startup_xapu_queue_checkand ranctest --test-dir <build> --no-tests=error -j 1 -V -R '^startup_xapu_(opus|queue)$'. Debug and Release/O2each passed 2/2 with no skips. Two additional source-built Debug variants reduced the output capacity to 647 frames while requesting 960, or requested 647 with capacity 648. Both returned exactly 647 frames in planar and interleaved output, matched the libopus reference, and left the tails untouched. These are interface tests; application playback still needs integration evidence. Hosted Windows and both Linux jobs passed. A reviewer other than the PR author should give the merge verdict.@R0Y00 on GitHub · 2026-11-27 22:01 UTC · original · reviewed
Independent verification of exact head
74d6e222integrated over554735ef. With libopus 1.5.2 andX2W_WITH_OPUS=ON, builtstartup_stub_xapu startup_xapu_opus_check startup_xapu_queue_check.ctest --test-dir <build> --no-tests=error -j1 -V -R '^startup_xapu_(opus|queue)$'passed 2/2 in both Debug and Release /O2, no skips. Checked that typed streams retain the full decode before applying trim/capacity and that the completion describes the kept output. Reapplied overmain6cc46a3c(treece7c05f4); the PR's code and fixtures are byte-identical, with only upstream documentation changes in its touched paths. Hosted Windows passed.