aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-05-03 20:23:35 -0700
committerChris Robinson <[email protected]>2011-05-03 20:23:35 -0700
commit7832a6d1d8fa6814b97d4486df2e3fe8e0d32171 (patch)
tree8b6f8babb9ea3fcdd49cb78680d4f7a80bcb7345 /Alc/ALc.c
parent0cce93a1f861903dba1724bc8ba5dc1a3abf69bb (diff)
Add a warning when HRTF is disabled
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 41f839e9..401441b6 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1142,9 +1142,11 @@ static ALCboolean UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
device->NumAuxSends = numSends;
}
+ if(!device->IsLoopbackDevice && GetConfigValueBool(NULL, "hrtf", AL_FALSE))
+ device->Flags |= DEVICE_USE_HRTF;
+
if(running)
return ALC_TRUE;
-
if(ALCdevice_ResetPlayback(device) == ALC_FALSE)
return ALC_FALSE;
@@ -1192,10 +1194,12 @@ static ALCboolean UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
ProcessContext(context);
}
- device->Flags &= ~DEVICE_USE_HRTF;
- if(ChannelsFromDevFmt(device->FmtChans) == 2 && device->Frequency == 44100 &&
- GetConfigValueBool(NULL, "hrtf", AL_FALSE))
- device->Flags |= DEVICE_USE_HRTF;
+ if(device->FmtChans != DevFmtStereo || device->Frequency != 44100)
+ {
+ if((device->Flags&DEVICE_USE_HRTF))
+ AL_PRINT("HRTF disabled (format is not 44100hz stereo)\n");
+ device->Flags &= ~DEVICE_USE_HRTF;
+ }
if(!(device->Flags&DEVICE_USE_HRTF) && device->Bs2bLevel > 0 && device->Bs2bLevel <= 6)
{