Files
Neutron/docs/analysis/sound-effects.md
T

2.9 KiB

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.