Document architecture checkpoint and restore original task callback order

This commit is contained in:
UnixNight committed 2026-10-25 12:56:17 -04:00
1 parent 69d0187a21
commit 531883aaac
45 files changed
+2935 -43

No files matched your search

+61
View File
@@ -0,0 +1,61 @@
# C6 follow-up: completion is software duration plus repeat
Primary static recovery,2026-10-25; same hashed EXE/DLL identities as the core
camera/audio/UI report. `checkpoint_voice_clock.py` verifies12 DLL instruction
anchors,3 vtable targets and2 constants, emitting PE-mapped physical file offsets.
No original executable was run. This refines the earlier unresolved “voice status”
interpretation; it does not establish transport output or native timing fidelity.
## Recovered call and field provenance
EXE47D890's channel slot14 is **not** a backend hardware-playing query. Both
DirectSound channel vtable10115420+14 (file115434) and WinSound channel
10116B3C+14 (file116B50), as well as base1011629C+14 (file1162B0), point to
DLL10071E40 (file71E40), exported `OMediaSoundChannel::get_playing_sound_info`.
Constructors1003AF58 and100F87DA install the respective derived tables.
10071E40 returns elapsed time through its first unsigned output and stored
duration+1C through the second. If duration is zero both outputs become zero.
When timer running (2C/2D clear), elapsed is engine millisecond clock100F8CF0
plus channel+28 minus channel+20; otherwise it uses frozen+24. At10071E7F..83
only **elapsed > duration** expires and clears duration+1C. Equality still reports
nonzero duration. This is neither a DirectSound GetStatus result nor a speaker
audibility check. The backend may query GetStatus in queue pumping, a different
consumer from this slot14 predicate.
After successful play, DX1003B46E..482 and Win100F891A..92E compute channel+1C
from sound+44 using `durationSeconds*1000 + .5` then integer conversion helper
10104E04. Constants10115450=1000 and10115448=.5. Exact conversion-mode semantics
of10104E04 and sound+44's decoder provenance still need a bounded follow-up;
do not assert PCM sample duration is always its bit-identical source.
Byte+30 is copied from the final boolean play argument: DX1003B32B reads it,
1003B338..343 turns it into the buffer's play flags,1003B46B stores it. Win
100F8893 selects flags2017/201F and100F8917 stores it. This is the **repeat/loop
flag**, not a pending-start flag. DX stop1003B657 clears+30 and+1C; Win stop
100F898F/100F8996 does the same. DX queue pump1003B691 skips its ordinary queued
advance when+30 is set. The interpretation is supported by matching play/stop/
queue branches in both backends; no original playback was observed.
Therefore EXE47D890's final predicate is structurally:
```text
valid engine + in-range handle + existing channel
AND (software duration returned by slot14 != 0 OR channel repeat flag != 0)
```
Calling this “hardware voice status” would be an overclaim. The explicit bank,
handle stop/release, failed play and engine timer pause still matter. The baseline
port's prepared-file-duration clock is closer to the ordinary one-shot source
clock than an SDL queue-empty predicate would be, but differs in integer boundary,
source duration identity, pause/clock ownership, invalid handles and dispatch order.
## Implementation consequence and remaining gate
Do not replace CAM/MCA completion with SDL queued bytes merely because source
polls a handle. First model source channel state (duration milliseconds, elapsed,
repeat, stop/invalid handle and engine clock pause), recover47D060 allocation/
play failure and source sound+44 derivation, then connect director completion to
that state. Independent SDL transport can remain the output mechanism. Current
duration/leftover-dt director behavior stays explicitly approximate until that
contract is tested. This bounded correction changes the C6 plan, not gameplay yet.