73 lines
4.6 KiB
Markdown
73 lines
4.6 KiB
Markdown
# Original default effects bank
|
|
|
|
Read-only EXE/OMT recovery and port SDL stream checks,2026-10-24. Text offsets
|
|
are VA minus0x400000. This is not original-game audio comparison or speaker testing.
|
|
|
|
Jimmy PostLoad423642 pushes string4EE08C=`SoundEffects.omt`, calls46A910,
|
|
and stores its database pointer to current sound database696008 at423656.
|
|
The separate sounds.omt has only4 waves and is not the numeric gameplay SFX bank.
|
|
SoundEffects.omt supplies251 Wave identities, including58=`door closing`,
|
|
59=`Door opening loop`,230=`winning prize2`.
|
|
|
|
458980 forwards three arguments to47D390;4589C0 forwards four to47D640 after
|
|
checking global4F8434. Both set volume through47DC80 from4F6B38.47D390 checks
|
|
current database696008 and tests/loads FourCC Wave/id via interface slots20/14
|
|
at47D3B6..DA. Contextual voice/music paths may temporarily switch the current
|
|
bank; the consumer currently uses the proven default for pickup/mechanism events.
|
|
This does not recover the entire original bank-switching/channel system.
|
|
|
|
Vertical-door417B28..43 calls4589C0(actor,-1,59,1), retaining its returned handle
|
|
while moving.41797E..4179AE stops that handle through458A00(handle,0), clears it
|
|
to-1 and calls4589C0(actor,-1,58,0). Reversing while the handle exists does not
|
|
start a second loop. Button411Cxx uses serialized AvailSound. Pickup435Fxx uses
|
|
serialized SoundIndex; trophy's230 identity is retained by the interaction path.
|
|
|
|
`tools/extractors/sound_bank.py` preserves each bounded source RIFF byte sequence,
|
|
archive/id/name/offset/hash and PCM duration in effects/effects.json. One resource,
|
|
162 bird1, contains format55 (MPEG Layer3) in RIFF. Its explicit fact sample count
|
|
is25344 at11025Hz; the encoded payload is retained unchanged. SDL3.4.2 local
|
|
src/audio/SDL_wave.c1755..57 explicitly rejects MPEG formats. Playback of162
|
|
therefore requires a separate decoder/conversion and remains unsupported; it is
|
|
not silently substituted. The currently connected lab effects use PCM resources.
|
|
|
|
PreparedEntityResources merges the bank with per-scene explicit references;
|
|
duplicate identities require equal duration and identical payload bytes. SceneAudio
|
|
uses independent one-shot streams and owner-keyed loops, stops door loops on
|
|
completion/reset, and disposes all voices on scene rebuild. Music and speech remain
|
|
independent. Original attenuation/pan/volume/channel limits and full jetpack sound
|
|
callbacks are incomplete, so current SDL mixing is an implementation policy.
|
|
|
|
Verification:2 Python tests compare all251 emitted RIFFs to exact original slices,
|
|
check original bank/call/FourCC instruction bytes, preserve source hash and reject
|
|
output in Original. Managed merge tests reject conflicting identities. The SDL
|
|
dummy-device --effects-audio-smoke consumes original58/59 streams, retains a
|
|
one-shot while stopping the loop, adds230 independently and clears all streams.
|
|
No physical speaker, original timing/position or native Windows audio claim follows.
|
|
|
|
|
|
## Cutscene music correction from user testing
|
|
|
|
The user reported music continuing during cutscenes in the packaged build.
|
|
The prior consumer always looped STRT music underneath all speech. Original CAM
|
|
activation416776..4167E1 explicitly checks current music database696004, obtains
|
|
Jimmy complete+0xA38 handle, calls47D7A0(handle,0), unloads his selected music
|
|
archive+0xA4C and clears696004. This happens before the new speech starts.
|
|
DEFAULT447D5C returns early if Jimmy already controls the player; otherwise
|
|
447F12..447F45 reloads his selected music and starts it again (source wave0).
|
|
|
|
SceneDirector now emits MusicStopped before an actual CAM speech and MusicRestarted
|
|
when DEFAULT returns control from a sequence. SceneAudio disposes the music stream
|
|
on stop and restarts the selected track on return; this is a restart, not a silent
|
|
advancing/resumed loop. Speech, effects and source scene actions remain separate.
|
|
The lab chain begins with CAM, so music stays stopped through its intervening MCA
|
|
shots until DEFAULT. A standalone MCA has its own source path431280; a universal
|
|
mute-on-any-speech rule is not established and has not been invented.
|
|
|
|
Seven exact EXE instruction checks guard the stop/restart sites. Director tests
|
|
check stop-before-speech, silence between chained shots, one natural restart,
|
|
no repeat restart with Jimmy already controlled, and skip restoration. The SDL
|
|
dummy --cutscene-audio-smoke runs the actual16-cue lab chain against original audio
|
|
resources and verifies zero queued music throughout, natural restart, reset silence
|
|
and skip restart. It passes. This fixes the implemented lab music lifecycle;
|
|
physical output/native Windows comparison remains user/runtime validation work.
|