diff options
author | Chris Robinson <[email protected]> | 2010-05-26 23:36:55 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2010-05-26 23:36:55 -0700 |
commit | 27a4c871fd9c339de8de36587dec204bc0b3c7c2 (patch) | |
tree | a330ef614b26951c2903d755a4a02a9f11df5f2e /Alc | |
parent | 37190b2cafdec52a23034194a3e63d8d33bdc544 (diff) |
Update head dampening after a device reset
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -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); |