re: the UI cues decode -- 0.53 s, 0.34 s and 1.02 s of real audio

Finishing the step I left open last iteration rather than starting
something new. Offsets and packet counts were in hand; what was missing
was proof they are actually waves.

slb_extract_wave.py wraps a (bank, offset, packets, channels, rate) slice
in a synthesized XMA1 RIFF, following the layout the Rust decoder already
uses. The three located cues decode to 0.533 s, 0.344 s and 1.016 s of
mono 48 kHz audio, audible from sample 0, each with the percussive
attack-and-decay envelope of a UI blip. Bitrates come out at 12-15 kB/s,
about half the stereo BGM rate, which is what mono should be.

The control matters more than the results. The SAME wrapper applied to
BGM_001's first wave decodes to 173.808875 s -- identical to the duration
that bank's own on-disc RIFF header produced back when Q10 was answered.
So the header I synthesized is not approximately right, it reproduces a
known-good decode exactly, and the cue durations are trustworthy for the
same reason.

I did not commit the decoded audio. Three commands regenerate it from the
disc, and the corpus's job is measurements and tooling rather than
extracted game assets. The offsets, the packet counts and the tool are
the deliverable.
This commit is contained in:
Sylpheed RE agent
2026-08-28 19:32:16 +00:00
parent 0d7199bc22
commit b1b2576769
4 changed files with 108 additions and 4 deletions

View File

@@ -17,3 +17,15 @@ Simultaneously at the main menu, two STEREO 48 kHz streams were decoding:
1893 packets / 3 876 864 B and 1919 packets / 3 930 112 B. See
structures/bgm-two-stems.md -- this is the runtime observation that the two
stems of a music bank play at the same time.
DECODED 2026-08-28 with tools/re-capture/slb_extract_wave.py + ffmpeg's xma1:
event offset packets decoded rms peak envelope shape
---------------- -------- ------- --------- ----- ----- ------------------------
d-pad move 0x1ec0 4 0.533 s 2085 29813 sharp attack, monotonic decay
B / back 0x0ec0 2 0.344 s 2985 16973 attack, peak in frame 2
(pre-input cue) 0x5d6c0 6 1.016 s 4327 32767 peaks in frame 3, long decay
CONTROL: the same synthesized RIFF wrapper applied to BGM_001.slb's first wave
(offset 14336, stereo) decodes to 173.808875 s -- identical to the duration
obtained from that bank's own on-disc RIFF header. The wrapper is correct.