Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andsnd_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:
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 makesnd_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.