240 s parked on the main menu, reached by using the XMA probe log as the screen oracle instead of video -- the route the previous iteration wrote down. Menu in 26.8 s against never-in-378 s for the video rig, guest at 0.92x, capture at 0.08 % silence against the recipe page's own best of 0.31 %. BGM_103's contexts verify the screen and no ADV context appears afterwards, so the attract loop never took over. Three results, two instruments. NO SEAM: zero runs >= 0.3 s below median-18 dB in 232 s. The port's 3.4 s near-silence is a property of its authored loop, not of the game. NOT THE WAVE LENGTH: autocorrelation r at 87.750 s is -0.009 on four independent windows; the top lag is 61.909 s with a 2x harmonic. Estimator controls recover 87.750 and 60.000 exactly. 61.93 s, INDEPENDENTLY: locating 30 s slices of the capture inside the decoded summed waves shows playback advancing exactly +5.00 s per 5 s and wrapping at 61.93, from three wraps. Control: slices cut from the wave itself at 10/45/70 s are found at 10.00/45.00/70.00. Two points mis-lock where the slice straddles a wrap and they carry the two lowest scores in the table. Offsets span 0.25..57.18 s of an 87.744 s wave, so the loop is [~0, 61.93) and the final ~25.8 s is never played -- exactly where bgm-two-stems.md found the fade-out and trailing silence. The game loops before the fade, which is why there is no seam. Also corrects my own '8 of 10 three-chunk regions start mid-stream'. The port counts 25 three-chunk regions; it is right that both numbers cannot describe the same set. My audit run was CUT SHORT -- the committed file ends mid-list with no summary line -- so that was a ratio over an unknown fraction of the population, and the claim that the defect is specific to multichannel regions is now unsupported. The ADV verification and the fix's own sweep are unaffected; that sweep ran to completion and printed its totals. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wuu56cE8vJGTBtn1ppsk8v
23 lines
1.0 KiB
Rust
23 lines
1.0 KiB
Rust
//! Dump one BGM bank's waves as RIFF/XMA so they can be decoded and compared
|
|
//! against a capture of the running game.
|
|
//!
|
|
//! cargo run -p sylpheed-formats --example bgm_dump -- BGM_103.slb OUTDIR
|
|
use sylpheed_formats::media::{self, DirectorySource};
|
|
use sylpheed_formats::slb;
|
|
|
|
fn main() {
|
|
let name = std::env::args().nth(1).unwrap_or_else(|| "BGM_103.slb".into());
|
|
let out = std::env::args().nth(2).expect("OUTDIR");
|
|
let disc = std::env::var("SYLPHEED_DISC").expect("SYLPHEED_DISC");
|
|
let src = DirectorySource::new(std::path::PathBuf::from(&disc));
|
|
std::fs::create_dir_all(&out).expect("outdir");
|
|
let h = sylpheed_formats::hash::name_hash(&name);
|
|
let bytes = media::read_sound_bank(&src, h).expect("bank");
|
|
println!("{name}: {} B", bytes.len());
|
|
for (i, r) in slb::to_xma_riffs(&bytes).iter().enumerate() {
|
|
let p = format!("{out}/{}_{i}.xma", name.trim_end_matches(".slb"));
|
|
std::fs::write(&p, r).expect("write");
|
|
println!(" wave {i}: {} B (byte_size {}) -> {p}", r.len(), r.len() - 60);
|
|
}
|
|
}
|