aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2015-09-05 14:22:19 -0700
committerChris Robinson <[email protected]>2015-09-05 14:33:21 -0700
commit5d8a1c11b5f524b645b829838580472ea4e6eb09 (patch)
tree5f6e56c8f22d216e862912ad78fe5f3c2c487fba /Alc
parent365a010732a59de85c3747f4a2df56c4ce4762ae (diff)
Avoid setting an HRTF-compatible format when it's disabled
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 593af3e6..0bce53ac 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1937,15 +1937,15 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
ERR("Unexpected hrtf value: %s\n", hrtf);
}
- if(hrtf_userreq == Hrtf_Enable || hrtf_appreq == Hrtf_Enable)
+ if(hrtf_userreq == Hrtf_Enable || (hrtf_userreq != Hrtf_Disable && hrtf_appreq == Hrtf_Enable))
{
- if(!FindHrtfFormat(&device->FmtChans, &device->Frequency))
+ if(FindHrtfFormat(&device->FmtChans, &device->Frequency))
+ device->Flags |= DEVICE_CHANNELS_REQUEST | DEVICE_FREQUENCY_REQUEST;
+ else
{
hrtf_userreq = hrtf_appreq = Hrtf_Default;
device->Hrtf_Status = ALC_HRTF_UNSUPPORTED_FORMAT_SOFT;
}
- else
- device->Flags |= DEVICE_CHANNELS_REQUEST | DEVICE_FREQUENCY_REQUEST;
}
}
else if(hrtf_appreq == Hrtf_Enable)