tooling: inventory bounded AWC sound-effect metadata #305

Manually merged
github merged 3 commits from gh-pr/305/head into gh-pr/305/base 2026-11-26 21:41:44 +00:00
Owner

@⁠Vonsek on GitHub · 2026-11-21 21:38 UTC · original
Vonsek:codex/audio-format-metadata → main · +207 −0 · 6 files · 3 commits · merged 2026-11-22 02:36 UTC

Change

The resource report identifies the outer package archive by its signature. This adds a bounded audio metadata reader for a caller-supplied ADAT bank range. It reports the number of sounds and groups their recorded sample counts by sample rate and numeric codec ID. The reader validates tag ownership and extents before accessing each 32-byte sound format header.

The supported profile is little-endian v1, flag word 0xff000001 or 0xff020001, with a nonempty data tag and a 0x76 format tag per sound. These field definitions are available in the pinned vgmstream reader. This implementation uses the repository's existing raw range reader and adds no dependency. The experiment gives the CLI and profile limits.

Verification

Commit 77b2bbe1e373cc46aaf82bf50b66a81f11691240 on b53bfb0b6489398aba7a81f3761e2d56aaa00ccf, Windows x64 with Python 3.12.

  • python -B tests/awc_metadata_check.py MetadataChecks.test_command failed before the implementation because the inventory command was absent (exit 2). The same command passes on this commit.
  • In a fresh worktree, python -m venv out/pe-env, out/pe-env/Scripts/python.exe -m pip install -r requirements-dev.txt, . ./tools/dev.ps1, and cmake --preset dev succeeded. ctest --preset dev --no-tests=error -R '^(audio_awc_metadata|resource_range_controls|docs_links)$' --output-on-failure passed all three tests.
  • git diff --check HEAD^ HEAD passed.

Evidence and follow-up

The original MIT-licensed fixture packs three synthetic sounds with two codecs, two sample rates and physically interleaved tags. The command groups their counts and sample totals. A guarded stream returns at most three bytes per read and raises on any request outside the header tables and format metadata. The controls cover a format tag aliasing audio data, a tag extending beyond the supplied range, damaged stream ownership, unsupported flags, and the stream-count budget.

A private inspection of one package used thirty evenly spaced 2 MiB windows to locate aligned ADAT markers. Three hits fit the documented profile. The reader reported 563, 603 and 176 streams, all with 48,000 Hz and numeric codec ID 11. For this observation the supplied extents ended at the greatest declared tag end. Archive directory membership, a codec name and playback remain unverified. No local assets are included.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed.
  • I did not include game files, dumps, distribution links or secrets.

This contribution was AI-assisted.

**@⁠Vonsek** on GitHub · 2026-11-21 21:38 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/305) `Vonsek:codex/audio-format-metadata` → `main` · +207 −0 · 6 files · 3 commits · merged 2026-11-22 02:36 UTC ## Change The resource report identifies the outer package archive by its signature. This adds a bounded audio metadata reader for a caller-supplied ADAT bank range. It reports the number of sounds and groups their recorded sample counts by sample rate and numeric codec ID. The reader validates tag ownership and extents before accessing each 32-byte sound format header. The supported profile is little-endian v1, flag word `0xff000001` or `0xff020001`, with a nonempty data tag and a 0x76 format tag per sound. These field definitions are available in the [pinned vgmstream reader](https://github.com/vgmstream/vgmstream/blob/24ffd6ce3e1f34fdebf9f5316d18ad2e162838ce/src/meta/awc.c). This implementation uses the repository's existing raw range reader and adds no dependency. The [experiment](https://github.com/Vonsek/Xbox2Windows/blob/77b2bbe1e373cc46aaf82bf50b66a81f11691240/docs/experiments.md#awc-sound-effect-format-metadata) gives the CLI and profile limits. ## Verification Commit `77b2bbe1e373cc46aaf82bf50b66a81f11691240` on `b53bfb0b6489398aba7a81f3761e2d56aaa00ccf`, Windows x64 with Python 3.12. - `python -B tests/awc_metadata_check.py MetadataChecks.test_command` failed before the implementation because the inventory command was absent (exit 2). The same command passes on this commit. - In a fresh worktree, `python -m venv out/pe-env`, `out/pe-env/Scripts/python.exe -m pip install -r requirements-dev.txt`, `. ./tools/dev.ps1`, and `cmake --preset dev` succeeded. `ctest --preset dev --no-tests=error -R '^(audio_awc_metadata|resource_range_controls|docs_links)$' --output-on-failure` passed all three tests. - `git diff --check HEAD^ HEAD` passed. ## Evidence and follow-up The original MIT-licensed fixture packs three synthetic sounds with two codecs, two sample rates and physically interleaved tags. The command groups their counts and sample totals. A guarded stream returns at most three bytes per read and raises on any request outside the header tables and format metadata. The controls cover a format tag aliasing audio data, a tag extending beyond the supplied range, damaged stream ownership, unsupported flags, and the stream-count budget. A private inspection of one package used thirty evenly spaced 2 MiB windows to locate aligned ADAT markers. Three hits fit the documented profile. The reader reported 563, 603 and 176 streams, all with 48,000 Hz and numeric codec ID 11. For this observation the supplied extents ended at the greatest declared tag end. Archive directory membership, a codec name and playback remain unverified. No local assets are included. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. - [x] I updated README/docs when a capability or build requirement changed. - [x] I did not include game files, dumps, distribution links or secrets. This contribution was AI-assisted.
The outer package signature leaves audio format and stream count unresolved. Read the format tags within a supplied ADAT range so an inventory can group streams without accessing sample data.
Keep the expanded texture experiment and its test selector alongside the metadata experiment.
Keep the AWC and material-effect fixtures registered in both CTest and the Linux job.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:41:43 +00:00
github manually merged commit 6543f1e500 into gh-pr/305/base 2026-11-26 21:41:44 +00:00
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-21 21:38 UTC · original · edited 2026-11-21 22:07 UTC

Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T22:07:46.487398Z 6543f1e Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review" or "@⁠codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-21 21:38 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/305#issuecomment-7069612489) · edited 2026-11-21 22:07 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"6543f1e50042ff75df02d2898eb2bfa582f0b45b","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-21T22:07:46.487398Z">2026-11-21T22:07:46.487398Z</relative-time> | `6543f1e` | Manual request | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review" or "@⁠codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-21 21:58 UTC · original

At 77b2bbe the merge conflicts are in README.md. Keep the AWC capability row alongside the descriptor-key lookup added in #298.

**@⁠R0Y00** on GitHub · 2026-11-21 21:58 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/305#issuecomment-7069851913) At `77b2bbe` the merge conflicts are in `README.md`. Keep the AWC capability row alongside the descriptor-key lookup added in #298.
Author
Owner

@⁠Vonsek on GitHub · 2026-11-21 22:04 UTC · original

The README at 6543f1e keeps the AWC capability row and the texture descriptor-key lookup from #298. I also retained the AWC and SGD5 checks in CTest and Linux CI when #315 landed. All five selected CTest cases passed locally, and all three CI jobs passed on this commit.

@⁠codex review

**@⁠Vonsek** on GitHub · 2026-11-21 22:04 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/305#issuecomment-7069922140) The README at `6543f1e` keeps the AWC capability row and the texture descriptor-key lookup from #298. I also retained the AWC and SGD5 checks in CTest and Linux CI when #315 landed. All five selected CTest cases passed locally, and all three [CI jobs](https://github.com/R0Y00/Xbox2Windows/actions/runs/44954558252) passed on this commit. @⁠codex review
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-21 22:07 UTC · original

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 6543f1e500

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@⁠codex address that feedback".

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-21 22:07 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/305#issuecomment-7069959038) <!-- codex-review-receipt:v1 --> Codex Review: Didn't find any major issues. Another round soon, please! **Reviewed commit:** `6543f1e500` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@⁠codex address that feedback". </details>
This discussion has been locked. Commenting is limited to contributors.
No description provided.