Repository navigation
Conversation
|
Tested 9cf2350 on Windows, CPython 3.14.7, CPU only (no GPU, no game files). One cost in import io, sys
sys.path.insert(0, "tests")
import test_awc_markers as t
class Count(io.BytesIO):
total = 0
def read(self, n=-1):
buf = super().read(n)
self.total += len(buf)
return buf
bank = t.speech_bank(3, 64, t.event(1, 1.0, 2))
for count in (128, 256, 512):
data = bank * count
f = Count(data)
print(len(data), sum(1 for _ in t.awc_markers.iter_banks(f, len(data))), f.total)
Below the window size that is quadratic in the number of banks; above it the cost is capped at about 1 MiB per bank, which for an archive of many small banks is still far more than its size. Keeping the current buffer while the next bank starts inside it, and refilling only at its end (with the three-byte overlap kept for a signature that crosses the boundary), reads each byte about once. These are bytes through AI-assisted. |
iter_banks read a fresh window of up to 1 MiB after every bank, so a run of small banks cost a window each (found in review of ItsNotRexed#3916). A window is now reused until the search leaves it; the report for audio.rpf is byte-identical. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
@shdann thanks, reproduced and fixed in Your script, before and after (bytes through
The rest above the input size is the header read of each bank by AI-assisted. |
|
Tested
All 226,788 story marker chunks were multiples of 16 bytes. Every chunk had a stream length available for comparison. The scanner found zero chunks with decreasing timestamps and zero with a marker past the stream end. As a control, |
|
I traced the one missing length comparison in A synthetic eight-stream bank distinguished the codec check from the duplicate-format case. A second classifier independently reproduced the non-music counts. All eight AI-assisted with Claude and Codex. |
|
Addressed the denominator clarification in Documentation checks (links, repository paths, list items, design rows) and all eight marker tests pass: 20 checks total. No new corpus measurements or game files. CPU only. AI-assisted (Codex). |
|
Tested Passes
Defect:
Its sibling Not checked: the track-marker link and stretch figures and the name-hash trials. The page says those came from an uncommitted script ( |
|
Tested 039e87d merged with main 3faac55 on Linux (WSL2), Python 3.12.16: pass. |
|
Independent reproduction, from a separate pass over
One observation for the type table: the six single-record chunks labeled (Measured with a local standard-library script run under |
The report is written after the scan, and nothing compared --out with what the scan reads, so `awc_markers.py bank.awc --out bank.awc` replaced the bank with the JSON report, as did an --out naming a bank inside a scanned folder; an --out naming a directory ended in a PermissionError traceback after the scan. main() now checks --out before reading anything: a directory, or a path that report_paths.same_report_path matches to the archive, the bank or any *.awc the directory walk reads, is one "awc_markers: error:" line and exit 2, as awc_manifest.py already does. Reported in the review of ItsNotRexed#3916. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
@abilliontokens thanks, confirmed and fixed in
Tested on Windows 11 (26200), Python 3.12, CPU only:
Not changed: the report is still written in place, not through a temporary file, so a write that fails halfway leaves a partial report. And you are right that the track-marker link, stretch figures and name-hash trials came from a one-off script that is not in the tree; the page says so, and they stay unverified by anything committed here. The earlier passes on this PR were for AI-assisted. |
kacper-serewis
left a comment
There was a problem hiding this comment.
At 0470c6b an independent parser reproduced all 203 marker records in order across 11 chunks in the first eight marker-bearing banks found among 2,285 visited. Every chunk held whole 16-byte records. All flags were zero and timestamps were nondecreasing within each chunk and within the tool-reported stream length. Discovery and lengths came from the reviewed tool. The 48 kHz unit and marker semantics remain independently unverified.
AI-assisted independent review.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main already has the tool (an earlier head of this branch) and, since ItsNotRexed#6774, an OSError check for an unlistable folder in the lines this branch changed. Both are kept: input_paths() does the walk with main's onerror, scan() and the --out check use it, and main() reports an OSError from either. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Merged
One conflict: #6774 added an
AI-assisted. |
|
Tested
AI-assisted. |
|
Independent run on my own 1.0.2.1 copy — every count in the docs table reproduces exactly.
So the XMA2 note is right on independent data: exactly one of the 419,223 non-music chunks lacks an Opus-derived length, and the length comparison covers the other 419,222. The layout checks are clean at full scale, not just on fixtures: One presentation note. The text summary ends with Verdict: the tool, the tests and the docs agree with an independent package; no blocking issues. AI-assisted. |
ASSET-303, claimed in the coordination issue: #3796 (comment)
What and why
docs/audio_config.mdsays the config has no per-track start offsets. The finding in the coordination issue reported that AWC tag0xBDof the music banks holds marker events, including track markers.While this was being measured,
maingained the record layout of the tag over the whole archive (4cf7e3e, #3272:decode_marker_recordsintools/rsc8_audio.pyand "The0xbdcue records" indocs/rsc8_audio.md). This pull request is merged with that and does not repeat it: it adds what that page does not have, the music banks on their own and what their records mark. The two counts were made independently and agree where they overlap (945 + 419,223 = 420,168 tags, 31,330 + 750,020 = 781,350 records, 167 types, 363,166 records with a zero last field).docs/audio_config.md: new section "Marker events (AWC tag0xBD)": the tag in the 3,008 streamed-music banks (their streams have no0x76tag, so the offsets are checked against the0x48descriptor's length instead), the time unit, counts split by kind of bank, the event-type table (hashes and counts), what is confirmed about the track markers and what is not, and a Reproduce section.tools/awc_markers.py(new, standard library,python -I): walks an archive, one bank or a directory of banks and reports counts, sizes, 32-bit hashes and numeric ranges for the0xBDchunks. It prints no names and reads no audio.tests/test_awc_markers.py(new): seven tests on hand-built synthetic banks; one holdsawc_markers.events()torsc8_audio.decode_marker_records().docs/audio.mdand thedocs/README.mdrow.Measured
Xbox Series 1.0.2.1
audio.rpf, every bank (7,162 banks, 1,606,241 streams, the countsdocs/rsc8_audio.mdhas):0x48)0xBDchunk0xA6D93246: 1,042 events in 910 chunks. 905 chunks have exactly one (900 at time 0); five long mixes (2,386 s to 7,232 s) have 22, 24, 25, 25 and 41.valueof a one-marker bank (32 of 41, 22 of 22, 10 of 24, 0 of 25, 0 of 25).joaatof a plain lowercase word (the 7 words of the finding, 7 of 7, and 2 of 89 more tried). The page lists hashes only.0xE5C74063the last field equals the integer value (418,838 of 418,838), and the 330,756 records of type0xDBEDD43Care all at time 0.0xB422-0xBFC6, 272,442.8 s (rpf9_carve.py --until-adat,audio_config.py --join --json); 3,008 music banks, 3,116 descriptor channels, 2,501 of 2,958 one-channel descriptors with stereo packets. All 1,589 records have a streamed-music channel of the same length within 0.01 s. The "1,584 of 1,589" line ofdocs/audio_config.mddid not reproduce exactly: 8 stream ids occur in two banks of different length, so the count is 1,581 to 1,589 depending on which bank is taken (1,585 with the first or last in archive order).Tested
Windows 11, Python 3.14, CPU only (no GPU involved). Run again after the merge with
mainaa2988c.Checklist
docs/design.md, with how it was confirmed. (Not a translator rule.)Not checked: no audio was decoded, so the finding's test that a marker sits at an audible track change was not repeated; what the types other than the track marker mean; the other archives with AWC banks (
story000.rpfand the rest) were not scanned; the track-marker cross-checks and the name-hash trials came from a local script that is not in this pull request.AI-assisted.