[pr-diagnostics][startup][audio] Report Windows spatial audio stream failures at startup #272

Open
superhero-520 wants to merge 1 commit from superhero-520/Darner:spatial-audio-startup-check into main
First-time contributor

Refs #256.

Contributor role (optional)

superhero-520

What it changes

On main, startup checks whether Windows has a default playback device. In #256 that check passed, but Windows returned 0x80040154 when asked to create a spatial audio stream.

Startup now requests a static front-left/front-right stream with the endpoint's preferred object format and releases it immediately. A failure shows the operation and HRESULT in the console and startup picture. The title can continue. No audio is played.

How it was tested

  • Tested b262a36670db3d9d6a251cd6bef32ed0f908e853 on Windows with Rust 1.98.1.
  • cargo +1.98.1 test --locked -p darner-hle --lib modules::audio::output::tests -- --nocapture passed all 7 tests.
  • A controlled COM test of the production function verified the complete preferred format, a successful stream release and the injected 0x80040154 at stream activation. Neither case called Start.
  • Default behavior changes on Windows hosts with a playback endpoint. This development session had zero playback endpoints. Before and after the change, darner run printed the same three missing-device lines and then reported the intentionally absent input file. No physical playback endpoint, affected Windows 10 installation or gameplay run was available here.
  • Both cargo +1.98.1 clippy --workspace --all-targets --locked -- -D warnings and its --all-features variant passed. cargo +1.98.1 xtask policy passed for 555 files. cargo +1.98.1 build --locked -p darner passed. cargo +1.98.1 test --locked -p darner-hle --lib -- --test-threads=1 passed 498 tests with 15 ignored, including all 19 audio tests. I stopped the default-concurrency workspace run after its GPU test process had run for 15 minutes, with no further completions for over 13 minutes. cargo +1.98.1 test --workspace --locked -- --test-threads=1 then exited 101. The GPU suite passed 1,772 tests, ignored 81 and failed watch::tests::ask_once_by_res_splits_reservations_without_refusals (Some(140931) versus None). The assertion is also present on base f3840d73. PR #150 addresses how it checks write history.

Checklist

  • In-game verification. The host and controlled COM checks are described above.
  • One change based on main f3840d73.
  • The diff follows the asset policy.
  • Dependencies recorded. None.

Checked for overlap

  • Searched open and closed contributions for this issue and the affected files.
  • #9, #12, #16, #47, #48, #75, #95 and #143 also touch the startup caller. #185 changes another Windows feature in the same manifest. #248 concerns the XMA worker. None adds this spatial stream check.
Refs #256. ## Contributor role (optional) superhero-520 ## What it changes On main, startup checks whether Windows has a default playback device. In #256 that check passed, but Windows returned `0x80040154` when asked to create a spatial audio stream. Startup now requests a static front-left/front-right stream with the endpoint's preferred object format and releases it immediately. A failure shows the operation and HRESULT in the console and startup picture. The title can continue. No audio is played. ## How it was tested - Tested `b262a36670db3d9d6a251cd6bef32ed0f908e853` on Windows with Rust 1.98.1. - `cargo +1.98.1 test --locked -p darner-hle --lib modules::audio::output::tests -- --nocapture` passed all 7 tests. - A controlled COM test of the production function verified the complete preferred format, a successful stream release and the injected `0x80040154` at stream activation. Neither case called Start. - Default behavior changes on Windows hosts with a playback endpoint. This development session had zero playback endpoints. Before and after the change, `darner run` printed the same three missing-device lines and then reported the intentionally absent input file. No physical playback endpoint, affected Windows 10 installation or gameplay run was available here. - Both `cargo +1.98.1 clippy --workspace --all-targets --locked -- -D warnings` and its `--all-features` variant passed. `cargo +1.98.1 xtask policy` passed for 555 files. `cargo +1.98.1 build --locked -p darner` passed. `cargo +1.98.1 test --locked -p darner-hle --lib -- --test-threads=1` passed 498 tests with 15 ignored, including all 19 audio tests. I stopped the default-concurrency workspace run after its GPU test process had run for 15 minutes, with no further completions for over 13 minutes. `cargo +1.98.1 test --workspace --locked -- --test-threads=1` then exited 101. The GPU suite passed 1,772 tests, ignored 81 and failed `watch::tests::ask_once_by_res_splits_reservations_without_refusals` (`Some(140931)` versus `None`). The assertion is also present on base `f3840d73`. PR #150 addresses how it checks write history. ## Checklist - [ ] In-game verification. The host and controlled COM checks are described above. - [x] One change based on main `f3840d73`. - [x] The diff follows the asset policy. - [x] Dependencies recorded. None. ## Checked for overlap - [x] Searched open and closed contributions for this issue and the affected files. - #9, #12, #16, #47, #48, #75, #95 and #143 also touch the startup caller. #185 changes another Windows feature in the same manifest. #248 concerns the XMA worker. None adds this spatial stream check.
First-time contributor

PASS

Review of b262a3667.

Audited spatial-audio startup behavior, COM activation and lifetime, the activation-property blob, and audio-format handling. No blocking correctness issue found.

Windows validation: G1 PASS; G2 PASS; cargo xtask policy PASS (555 files ok); cargo test --locked -p darner-hle --lib audio — 23 passed, 0 failed; cargo test --locked -p darner --bin darner — 148 passed, 0 failed, 1 ignored.

Not run in-game.

AI-assisted: yes (GitHub Copilot, Auto mode).

**PASS** Review of `b262a3667`. Audited spatial-audio startup behavior, COM activation and lifetime, the activation-property blob, and audio-format handling. No blocking correctness issue found. Windows validation: G1 PASS; G2 PASS; `cargo xtask policy` PASS (`555 files ok`); `cargo test --locked -p darner-hle --lib audio` — 23 passed, 0 failed; `cargo test --locked -p darner --bin darner` — 148 passed, 0 failed, 1 ignored. Not run in-game. AI-assisted: yes (GitHub Copilot, Auto mode).
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'spatial-audio-startup-check:superhero-520-spatial-audio-startup-check'
git switch 'superhero-520-spatial-audio-startup-check'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'superhero-520-spatial-audio-startup-check'
git switch 'superhero-520-spatial-audio-startup-check'
git rebase 'main'
git switch 'main'
git merge --ff-only 'superhero-520-spatial-audio-startup-check'
git switch 'superhero-520-spatial-audio-startup-check'
git rebase 'main'
git switch 'main'
git merge --no-ff 'superhero-520-spatial-audio-startup-check'
git switch 'main'
git merge --squash 'superhero-520-spatial-audio-startup-check'
git switch 'main'
git merge --ff-only 'superhero-520-spatial-audio-startup-check'
git switch 'main'
git merge 'superhero-520-spatial-audio-startup-check'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
TrustNo1/Darner!272
No description provided.