Skip to content

Add 5.1 surround sound - #341

Open
frankyfife wants to merge 1 commit into
OpenCommunityEdition:mainfrom
frankyfife:audio-aniso
Open

frankyfife wants to merge 1 commit into
OpenCommunityEdition:mainfrom
frankyfife:audio-aniso

Conversation

@frankyfife

@frankyfife frankyfife commented Oct 13, 2026 •

Copy link
Copy Markdown

5.1 surround sound for the desktop builds. (This pull request first also forced anisotropic filtering; that part is gone, see below.)

Change: audio.channels (HALO_AUDIO_CHANNELS; "auto", "stereo" or "5.1"; Linux and Windows).

  • On 5.1 the speaker config reports AC-3, as an Xbox set to Dolby Digital, so the game sends its 2D voices to the center and back mix bins itself; the speaker mix bins 0-5 are SDL's 5.1 channel order.
  • 3D voices pan with equal power between adjacent speakers at the ITU-R BS.775 angles, spread out when close or above, at the stereo pan's power. Stereo voices positioned in the world pan their middle the same way and keep their width on the front pair.
  • The voices' resampling, low passes and reverb send are the stereo mix's. The reverb plays from the front and back pairs, the voice chat from the front pair, and the limiter takes all six channels. Nothing goes to the LFE channel (the game sends nothing there).
  • Stereo output mixes exactly as before. Android and the web stay stereo.
  • Rendering and networking are untouched.

Default: "auto" is 5.1 only when the sound device has six or more channels. That is the Xbox's own behaviour rather than a departure from it: the game asked the console's speaker setting and mixed for 5.1 when Dolby Digital was on. Happy to make it "stereo" if the project prefers.

Test: Windows, release build on main 8102e71: with a 6-channel device sound: 5.1 surround is logged and the device opens; with "stereo", and with no 6-channel device, the output is the stereo mix. Not built for Android or the web here (they keep the stereo path, which is unchanged).

🤖 Generated with Claude Code

The mixer outputs stereo or 5.1 (audio.channels: "auto", "stereo" or
"5.1"; HALO_AUDIO_CHANNELS; Linux and Windows). On 5.1 the speaker config
reports AC-3, as an Xbox set to Dolby Digital, so the game sends its 2D
voices to the center and back mix bins itself; the speaker mix bins 0-5
are SDL's 5.1 channel order. 3D voices pan with equal power between
adjacent speakers at the ITU-R BS.775 angles, spread out when close or
above, at the stereo pan's power; stereo voices positioned in the world
pan their middle the same way and keep their width on the front pair.
The voices' resampling, low passes and reverb send are the stereo mix's;
the reverb plays from the front and back pairs, the voice chat from the
front pair, and the limiter takes all six channels. Stereo output mixes
as before. Android and the web stay stereo.

"auto" is the Xbox's own behaviour: the game asked the console's speaker
setting and mixed for 5.1 when Dolby Digital was on.

Checked on Windows with a 6-channel device: "sound: 5.1 surround" is
logged and the device opens; with "stereo", and with no 6-channel
device, the output is the stereo mix as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@frankyfife frankyfife changed the title Add 5.1 surround sound and display.anisotropy Add 5.1 surround sound Oct 14, 2026
@frankyfife

Copy link
Copy Markdown
Author

I've taken anisotropic filtering out of this pull request in favour of #343, which does it better: it leaves the render targets alone (I hadn't checked the water's ripple map), applies a change without a restart, has a menu row, and doesn't default to a 16x departure from the Xbox's look. Thanks @startupfoundry for the comparison.

This pull request is now only 5.1 surround sound, rebased on the current main (8102e71).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant