https://gitlab.synchro.net/main/sbbs/-/commit/fc82f87d19f90338ab6cde8d
Modified Files:
src/doors/syncduke/syncduke_stubs.c src/doors/termgfx/audio.c audio.h audio_mgr.c audio_mgr.h
Log Message:
syncduke: stereo pan for positional audio (ambiences + one-shots)
Builds on the distance-attenuation fix: now sounds also track DIRECTION. SyncTERM's A;Volume APC accepts separate VL/VR (live per-channel left/right, not just mono V), so a running loop can be re-panned every frame with no re-queue click -- our wrapper only emitted V=, so add a VL=/VR= builder.
- audio.c/.h: termgfx_audio_volume_lr() -- live per-side channel volume.
- audio_mgr.c/.h: termgfx_audio_loop_volume() takes a pan, computes VL/VR
(side toward the source full, opposite ramps -- the original audiolib law),
and suppresses unchanged L/R so per-frame calls stay cheap.
- syncduke_stubs.c: sd_angle_to_pan() replicates MV_CalcPanTable's triangle
exactly (front=center, hard right at angle 8, behind=center, hard left at
24). FX_Pan3D pushes volume+pan to loops; one-shots (FX_PlayVOC3D/WAV3D)
are panned at queue time via the existing pan slot.
Pan is discrete per-frame (no T= ramp yet). Live-confirmed by ear: the
cinema projector pans as you cross it, weapons/enemies have direction.
Co-Authored-By: Claude Opus 4.8 <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net