KB: audio backend was STUB DLLs (not just gated) -- now real OpenAL + in-tree WAV loader (task #50)
Correct the audio digest in wintesla-port.md + project-overview.md: the "no sound ever" root cause was that BOTH engine/lib backend DLLs were no-op stubs (libsndfile ordinal-only sf_open->NULL; OpenAL32 imports only KERNEL32). Now real OpenAL Soft + LoadWavPCM; soundbank cracked (241 samples). Only remaining gap = game triggering (AudioEntities). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
5b46655b82
commit
c75abca857
@@ -42,9 +42,11 @@ fire → damage → destroy → respawn** single-player loop (task #52). **2-nod
|
||||
end-to-end** — replication, cross-pod targeting/damage/kill, beam visuals, replicant gait (tasks
|
||||
#46-#51, [[multiplayer]]). All 8 cockpit canopies are authentic + the horizontal-FOV fix (task #55,
|
||||
[[cockpit-view]]); the Gyroscope is live byte-exact with hit-bounce (task #56); the **gauge system
|
||||
is complete** ([[gauges-hud]]). The engine/renderer/HAL are done (WinTesla); AUDIO is the exception —
|
||||
the OpenAL engine is ported + now on by default (2026-07-15) but the soundbank + game triggering are
|
||||
unbuilt, so it's still SILENT (see [[wintesla-port]] Audio). The active work
|
||||
is complete** ([[gauges-hud]]). The engine/renderer/HAL are done (WinTesla); AUDIO backend is now REAL
|
||||
(the repo's OpenAL32.dll + libsndfile-1.dll were both no-op STUBS — replaced with real OpenAL Soft +
|
||||
an in-tree WAV loader, 2026-07-15) and the 241-sample soundbank is cracked from AUDIO1/2.RES + loading;
|
||||
the ONLY remaining audio gap is game-triggering (no AudioEntities fire PlayNote yet), so gameplay is
|
||||
still silent apart from a proof-of-life hook (see [[wintesla-port]] Audio). The active work
|
||||
is reconstructing each BT subsystem's authentic behavior from the binary. Remaining: pod-LAN
|
||||
config, Mech-level update records, per-subsystem waves. [T2]
|
||||
|
||||
|
||||
+20
-13
@@ -16,19 +16,26 @@ on top of it. Full detail: `docs/PROGRESS_LOG.md §5b, §8`.
|
||||
## What WinTesla already did (do NOT rebuild)
|
||||
- **Renderer bypass: DONE** — `MUNGA_L4/L4D3D.cpp` + `DXUtils` replace libDPL / the IG board with
|
||||
Direct3D9. No `libdpl.lib` in the tree. (The early from-scratch D3D9 viewer was retired and removed.) [T1]
|
||||
- **Audio: ENGINE ported but NOT wired end-to-end** [T2, corrected 2026-07-15 — the old "DONE"
|
||||
was wrong]. OpenAL + libsndfile replace the HMI "SOS" engine, and the renderer→device→buffer→
|
||||
source→play chain IS all implemented (`L4AUDRND`/`L4AUDRES`/`L4AUDLVL`; `PatchLevelOfDetail::PlayNote`
|
||||
really calls `alSourcePlay`). But there were THREE gaps, so the game is SILENT: (1) it was gated
|
||||
OFF — `BTL4Application::MakeAudioRenderer` returned NULL unless the pod's `AWE_FRONT`/`AWE_REAR`
|
||||
sound-card env vars were set (dead on modern HW; the real "no sound" root cause). **RELAXED
|
||||
2026-07-15 to default-on** (`BT_NO_AUDIO=1` disables); the OpenAL device now opens. (2) The
|
||||
soundbank preset table `allPresets[2][100]` (btstubs.cpp) is a zero-init **STUB** — no
|
||||
sound-event→sample mapping, so 0 buffers load. The sample DATA exists in `AUDIO1/2.RES`
|
||||
(`EnginePower01`, `LaserAFire01-03`, `LaserASustain`, …) but the map is gone (not in the decomp).
|
||||
(3) The reconstructed game **never creates AudioEntities** — no triggering on weapon fire / steps /
|
||||
engine. So enabling real audio = reconstruct the soundbank + wire the game triggers (a proper audio
|
||||
wave). Diagnostic harness: `BT_AUDIO_LOG` traces the chain (Initialize → device → buffers → play).
|
||||
- **Audio: BACKEND now REAL + soundbank loaded; only game-triggering remains** [T2, updated
|
||||
2026-07-15]. OpenAL replaces the HMI "SOS" engine and the renderer→device→buffer→source→play chain
|
||||
IS all implemented (`L4AUDRND`/`L4AUDRES`/`L4AUDLVL`; `PatchLevelOfDetail::PlayNote` really calls
|
||||
`alSourcePlay`). The "no sound, ever" root cause was DEEPER than a gate — **both audio backend DLLs
|
||||
shipped in `engine/lib/` were no-op STUBS**: (a) `libsndfile-1.dll` exports 15 funcs BY ORDINAL
|
||||
ONLY (no names), `sf_open()` always returns NULL; (b) `OpenAL32.dll` (72KB) imported **only
|
||||
KERNEL32** — no dsound/wasapi/winmm — so it returned fake handles (`ctx=0x00000001`,
|
||||
`alGenSources→0`) and never touched the hardware. So the chain ran clean and silent. FIXES (commit
|
||||
5b46655): **OpenAL32.dll → real OpenAL Soft 1.25.2 Win32** (drop-in: the exe imports the 25 AL funcs
|
||||
by NAME; `alSourcePlay` now reaches `AL_PLAYING`). **libsndfile DROPPED** — replaced by `LoadWavPCM()`
|
||||
in `L4AUDRES` (a tiny in-tree RIFF/WAVE fmt+data reader, no external dep). Gates fixed earlier: the
|
||||
`AWE_FRONT`/`AWE_REAR` env-var gate in `MakeAudioRenderer` was **relaxed to default-on** (`BT_NO_AUDIO=1`
|
||||
disables). **Soundbank recovered**: 241 samples cracked from `AUDIO1/2.RES` (SF2 v1.0) by
|
||||
`tools/sf2extract.py` → `content/AUDIO/*.wav` + the `allPresets[2][128]` table (`audiopresets.cpp`,
|
||||
replacing the zero-init btstubs stub); all 241 load (`alErr=0`). **The ONLY remaining gap**: the
|
||||
reconstructed game **never creates AudioEntities** — nothing triggers `PlayNote` on weapon fire /
|
||||
footsteps / engine / explosion during play, so gameplay is still silent (a `BT_AUDIO_TEST` hook plays
|
||||
buffer0 as proof-of-life). Diagnostic harness: `BT_AUDIO_LOG` traces the chain; `BT_AUDIO_TEST` plays
|
||||
a sample. NOTE: the `AUDIO1/2.RES` were SF2 v1.0 (16-byte shdr records; sample rate assumed 22050 Hz
|
||||
— may need tuning if pitch is off).
|
||||
- **L4 HAL on Windows + the VS build system: DONE.** [T1]
|
||||
- **Red Planet game logic: COMPLETE & buildable** — `VTV/VTVMPPR/WEAPSYS/...`. RP is at/near playable. [T1]
|
||||
- **Multiplayer: the DOS `NETNUB` driver is already replaced by a ~3.5k-line WinSock2 TCP
|
||||
|
||||
Reference in New Issue
Block a user