disable ALC_HRTF_SOFT (#998)

* add snd_hrtf option, set ALC_HRTF_SOFT to ALC_DONT_CARE_SOFT (taken from GZDoom)

* disable HRTF, remove snd_hrtf config option

Thanks to Ceski.
This commit is contained in:
Roman Fomin 2023-04-20 08:03:41 +07:00 committed by GitHub
parent cca6449966
commit 573c5e4940
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -614,6 +614,11 @@ void I_InitSound(void)
ALCcontext *context;
ALCint srate = -1;
ALCint attribs[] = { // zero terminated list of integer pairs
ALC_HRTF_SOFT, ALC_FALSE,
0
};
if (nosfxparm && nomusicparm)
{
return;
@ -635,7 +640,12 @@ void I_InitSound(void)
return;
}
context = alcCreateContext(device, NULL);
if (alcIsExtensionPresent(device, "ALC_SOFT_HRTF") == AL_FALSE)
{
attribs[0] = 0;
}
context = alcCreateContext(device, &attribs[0]);
if (!context || alcMakeContextCurrent(context) == ALC_FALSE)
{
fprintf(stderr, "I_InitSound: Error making context.\n");