Fix positional audio panning opposite to the rendered camera
Investigate user-reported gunshots and other positional sounds coming from the wrong ear. Isolated worktree /home/mathias/Projects/worktrees/engines-spatial-audio, branch fix/spatial-audio-direction, based on local develop 7918400a0. Leave main checkout's unrelated grass changes untouched. Reuse existing ClientAudio/OpenAlBackend and camera contracts. Confirmed root cause: follow and fly cameras horizontally mirror projection; unchanged OpenAL world coordinates pan opposite to screen positions. Regression reproduced six heading/pitch failures before the fix. OpenAlCoordinates reflects Z consistently for source position and listener position/forward/up at the native boundary, preserving relative front/back/elevation and distances. World-space AudioListener/ClientAudio attenuation contracts, nonpositional origin, stereo music and UI sample channels remain unchanged. Verified: seven new spatial tests plus relevant audio/sound/music/camera checks: 171 passed, 12 conditional asset/native tests skipped. Excluded installation-only PreferenceInstallSeedTests because no fixture was configured. Initial container run also lacked SQLite; reran successfully using prk-client-acg-test-sdk:local with SQLite. Explicit client build: zero warnings/errors; git diff --check clean. Silent system OpenAL Soft stereo loopback corroborates both sides: unconverted screen-right gives L/R energy 142.447/31.423, reflected gives 31.423/142.447; screen-left reverses correspondingly. Scratch diagnostic /tmp/prk-spatial-audio-loopback.py, logs /tmp/prk-spatial-audio-{red,green,build}.log. Loopback validates native panning convention, not the running client or hardware. No GUI launched or live routing changed. Real-device/in-game audible confirmation and unsupported platforms remain separate checks; no audible equivalence claim. Committed as 59d12a03f (fix: Align positional audio panning with camera projection) and pushed with upstream origin/fix/spatial-audio-direction; isolated worktree is clean. Pull request #2637 — https://git.project-rk.com/prk/engines/pulls/2637 Title: fix: Align positional audio panning with camera projection. Head fix/spatial-audio-direction -> base develop; merged, confirmed by user. Task closed as done. In-game audible confirmation remains a follow-up. Existing broader audio tasks retain their separate implementation/platform gates. Acceptance: automated regression demonstrates screen-left/right versus audio-left/right across camera headings; consistent listener/source conversion fixes positional panning without changing world positions, attenuation or nonpositional stereo; relevant client audio/camera tests and build pass. Report actual-device audible verification separately.
Checklist
2 of 2 complete- Reproduce camera-screen versus OpenAL panning mismatch and verify a consistent spatial-coordinate fix with regression tests.
- Pass relevant audio/camera tests and client build; record native/output verification and outstanding audible checks.
- Area
- Project Rubi-Ka
- Project
- engines
- Kind
- Bug
- Task ID
tsk_d4828ee9j4- Updated