Pre-Flight — WP-019 — 2026-11-14
Filled-in copy of docs/reference/pre-flight for WP-019. Verdict at the bottom.
Written before engine code, on Jeff’s “continue” after PR #53 merged. WP-018’s close named the exit transition as the next step. Tracing it showed the transition plays a voice line, so audio comes first.
Header
- WP:
WP-019 - Title: Sound archives through
Audio::Mixer(Gen 1) - Pre-flight date:
2026-11-14 - Targets generation(s): 1
- Targets disc(s): Showdown, Phantom
Pre-flight intent
Validating readiness for
WP-019. Verdict only.
Dependency check
| Prereq | Status in WORK_INDEX |
Locked on | Notes |
|---|---|---|---|
| WP-004 | ✅ Done | 2026-11-13 | Format traced (0x43C5A0, 0x446010); probe_audio.py --verify passes on all 1,165 clips. |
| WP-006 | ✅ Done | 2026-11-13 | Phantom’s 1,067 clips pass; its audio code is byte-identical. |
| WP-014 | ✅ Done | 2026-11-14 | SearchMan finds files in the disc’s scooby folder. |
Repo + disc state
- Project worktree on new branch
claude/wp-019fromorigin/main(706953d), clean. - Fork on
scooby-engineat7659803ee5, clean, in sync. - Index check (2026-11-14). The names are unique ignoring case, within each file and across all three, in both titles. So one case-insensitive map per file is enough, and the search order only matters for names that aren’t there.
- Largest clips: 6.9 MB of music in Showdown and a 36.9 MB voice clip in Phantom. Clips stream from the file, not from memory.
Doc-vs-tree cross-check
- The exit transition (
0x402130→0x404820→0x4024C0) packs the destination,scene=,character=and per-character directions, and hands them to the game’s state object (0x402610, vtable+0x24). The walk and voice line run there. That is WP-020’s trace; this WP provides the audio it needs. - Integration §6 has no implementation notes yet. The close adds them.
Scope lock
Allowed paths (this repo):
docs/02-SCUMMVM-INTEGRATION.md (§6)
docs/formats/audio-archives.md (Next steps item 1)
docs/work-packets/WP-019-sound-archives.md
docs/work-packets/WORK_INDEX.md
docs/reference/pre-flight-WP-019-2026-11-14.md
Fork: engines/scooby/**, staged by name.
Risk review
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
| Can’t hear the output in a headless test | high | low | Check that the mixer consumed the stream: elapsed time over wall time, and the end of a non-looping clip. The bytes themselves are checked by MD5. |
| Driving the console from a script | med | low | Use SendKeys to the focused ScummVM window. If that’s unreliable, fall back to a debug start key, as start_room does. |
Verdict
- READY TO EXECUTE
- NOT READY
Prepared by: Claude (WP-001 session, continuing), on Jeff’s “continue” of 2026-11-14 Date: 2026-11-14
After execution — lessons learned
Lesson: a known format makes a short WP. WP-004 had pinned the format, down to the sector rule for the PCM start, so the engine reader was written once and matched all 2,232 clips on its first run.
Lesson: you can’t hear in a headless test, so check what the mixer did. The mixer’s elapsed time, against wall time and against the clip’s computed length, shows that the stream was consumed at the right rate. The MD5s show the bytes are right.
Lesson: scripted keystrokes don’t reach a background-launched SDL window. Neither SendKeys nor keybd_event opened the debugger. A config key is the reliable way to trigger engine features in tests, and it’s worth planning for in each WP’s pre-flight.
Scope note: the lock held. One fork commit, staged by name. The corrupt-file test used a scratch copy plus hard links, deleted afterwards. The ISOs were dismounted.