aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-02-23 20:00:52 -0800
committerChris Robinson <[email protected]>2014-02-23 20:00:52 -0800
commitef8002a83207730568d3cc7babe3351b4beee4e3 (patch)
tree83e1a3393bc461ca0f6c4cf7e03fbffdee0bd436 /Alc
parente6e3bdee83d86e8365179629997d9e0492909913 (diff)
Check the hrtf config option earlier
This is to make sure it tries to find an HRTF-compatible format before reseting the device, just like when using ALC_HRTF_SOFT.
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 53455fdf..391cfe11 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1791,6 +1791,14 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
device->Frequency,
device->UpdateSize, device->NumUpdates);
+ if(device->Type != Loopback)
+ {
+ int nohrtf = !(device->Flags&DEVICE_HRTF_REQUEST);
+ if(GetConfigValueBool(NULL, "hrtf", !nohrtf))
+ device->Flags |= DEVICE_HRTF_REQUEST;
+ else
+ device->Flags &= ~DEVICE_HRTF_REQUEST;
+ }
if((device->Flags&DEVICE_HRTF_REQUEST))
{
enum DevFmtChannels chans;
@@ -1840,14 +1848,6 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
V(device->Synth,update)(device);
device->Hrtf = NULL;
- if(device->Type != Loopback)
- {
- int nohrtf = !(device->Flags&DEVICE_HRTF_REQUEST);
- if(GetConfigValueBool(NULL, "hrtf", !nohrtf))
- device->Flags |= DEVICE_HRTF_REQUEST;
- else
- device->Flags &= ~DEVICE_HRTF_REQUEST;
- }
if((device->Flags&DEVICE_HRTF_REQUEST))
{
device->Hrtf = GetHrtf(device);