https://gitlab.synchro.net/main/sbbs/-/commit/3a6d1ff6e6a1fa1743752be8
Modified Files:
src/doors/syncduke/syncduke_stubs.c src/doors/termgfx/audio_mgr.c audio_mgr.h
Log Message:
syncduke: 3D distance attenuation for looping ambiences (projector et al.)
The engine re-pans every active positional voice each frame (sounds.c
calls FX_Pan3D), so ambiences like the E1L1 cinema projector should swell
as the player approaches. FX_Pan3D was a no-op stub, freezing each loop at
the volume it had when first triggered -- the projector started at vol=7 (player far away) and stayed inaudible no matter how close you walked.
- termgfx_audio_loop_volume(): update a running loop's channel volume live,
suppressing redundant sends so it's safe to call every frame.
- FX_Pan3D: map the per-frame distance to a volume (same curve as
sd_loop_play) and push it to the loop. One-shots never reach here
(fire-and-forget leaves Sound[].num==0, so the engine's pan loop skips
them). Pan/stereo still not wired -- distance attenuation is what governs
audibility here.
Live-confirmed: projector now audible on approach.
Co-Authored-By: Claude Opus 4.8 <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net