Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Super Stereo music option #1652

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Add a Super Stereo music option #1652

wants to merge 2 commits into from

Conversation

kcat
Copy link
Contributor

@kcat kcat commented Jun 28, 2022

This adds an option to play music using a Super Stereo algorithm, which can be set under the OpenAL options menu (or via the snd_musicmode and snd_superstereowidth cvars). This is primarily for surround sound (or HRTF) output, as it takes the stereo signal and creates a continuous left to right soundfield around the listener, instead of simply being two points that produce phantom sounds in between. This allows making the music wider or narrower as desired, while maintaining a stable center.

This relies on the AL_SOFT_UHJ extension added in OpenAL Soft 1.22.0.

This is currently a draft as there also needs to be text additions, which I'm not sure how to do. The needed text strings for the menu are:

OPTVAL_SUPERSTEREO = "Super Stereo"
OPENALMNU_MUSICMODE = "Music Mode"
OPENALMNU_SUPERSTEREOWIDTH = "Super Stereo Width"

I'm also looking for feedback if there's anything else to add or change. Currently changing the music mode (snd_musicmode) takes effect on the next music track, while changing the width (snd_superstereowidth) takes effect immediately. It also only affects music; since it's not the cheapest of algorithms, applying it to all stereo sounds with mods that (ab)use many stereo sounds even for things that are placed in 3D could needlessly burden and overwhelm the CPU. I also opted to make snd_musicmode an integer cvar since that makes it easier and more efficient to check at runtime, though it makes it less intuitive to change manually if you don't know what the values mean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants