Disable HRTF by default when using OpenAL Soft #2001
Merged
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.
OpenAL Soft will automatically enable HRTF if it detects that headphones are being used.
However, this may not be ideal as HRTF can cause audio to sound "muddy" and lower quality. Considering that in a recent change HRTF was disabled by default on HTML5, I think it would make sense to also disable it on native targets. The
AL_SOFT_direct_channelsandAL_SOFT_direct_channels_remixextensions are used to disable HRTF per source rather than globally (see: kcat/openal-soft#357 (comment)).I'm unsure if this change is required (or possible) with Apple's OpenAL implementation. As for MojoAL, it seems to not support HRTF at all.
Since OpenAL Soft's headphone detection seems to be hit or miss, it's easier to test this PR by manually forcing HRTF to be on using OpenAL's config. In the directory with the executable, create a file called
alsoft.inion Windows, oralsoft.confelsewhere. In it add:Without this patch, any played audio will sound less clean compared to the original audio file, while with the patch it should sound identical to the original file.