aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-05-26 23:36:55 -0700
committerChris Robinson <[email protected]>2010-05-26 23:36:55 -0700
commit27a4c871fd9c339de8de36587dec204bc0b3c7c2 (patch)
treea330ef614b26951c2903d755a4a02a9f11df5f2e
parent37190b2cafdec52a23034194a3e63d8d33bdc544 (diff)
Update head dampening after a device reset
-rw-r--r--Alc/ALc.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index c76fe1ac..e911bc11 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1586,6 +1586,15 @@ ALC_API ALCcontext* ALC_APIENTRY alcCreateContext(ALCdevice *device, const ALCin
device->Bs2b = NULL;
}
+ if(aluChannelsFromFormat(device->Format) <= 2)
+ {
+ device->HeadDampen = GetConfigValueFloat(NULL, "head_dampen", DEFAULT_HEAD_DAMPEN);
+ device->HeadDampen = __min(device->HeadDampen, 1.0f);
+ device->HeadDampen = __max(device->HeadDampen, 0.0f);
+ }
+ else
+ device->HeadDampen = 0.0f;
+
temp = realloc(device->Contexts, (device->NumContexts+1) * sizeof(*device->Contexts));
if(!temp)
{
@@ -1989,14 +1998,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
device->Bs2bLevel = GetConfigValueInt(NULL, "cf_level", 0);
- if(aluChannelsFromFormat(device->Format) <= 2)
- {
- device->HeadDampen = GetConfigValueFloat(NULL, "head_dampen", DEFAULT_HEAD_DAMPEN);
- device->HeadDampen = __min(device->HeadDampen, 1.0f);
- device->HeadDampen = __max(device->HeadDampen, 0.0f);
- }
- else
- device->HeadDampen = 0.0f;
+ device->HeadDampen = 0.0f;
// Find a playback device to open
SuspendContext(NULL);