diff options
author | Chris Robinson <[email protected]> | 2009-09-21 23:25:26 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-09-21 23:25:26 -0700 |
commit | 62cef44dcbb5368d383e45ba6201e0bfbce09612 (patch) | |
tree | 2cb8131fa6735559dfdb295012878d64193eb67c /Alc/ALc.c | |
parent | a2edc95207b798f43ff6704c993617bb67e738f9 (diff) |
Reinitialize the stereo-to-binaural filter after resetting the device
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -1205,6 +1205,15 @@ ALCAPI ALCcontext* ALCAPIENTRY alcCreateContext(ALCdevice *device, const ALCint device->NumAuxSends = GetConfigValueInt(NULL, "sends", numSends); } + if(ALCdevice_ResetPlayback(device) != ALC_FALSE) + { + alcDestroyContext(ALContext); + ALContext = NULL; + SetALCError(ALC_INVALID_VALUE); + } + + ALContext->Frequency = device->Frequency; + free(device->Bs2b); device->Bs2b = NULL; if(device->Bs2bLevel > 0 && device->Bs2bLevel <= 6) @@ -1214,15 +1223,6 @@ ALCAPI ALCcontext* ALCAPIENTRY alcCreateContext(ALCdevice *device, const ALCint bs2b_set_level(device->Bs2b, device->Bs2bLevel); } - if(ALCdevice_ResetPlayback(device) == ALC_FALSE) - { - alcDestroyContext(ALContext); - ALContext = NULL; - SetALCError(ALC_INVALID_VALUE); - } - else - ALContext->Frequency = device->Frequency; - ProcessContext(NULL); } else |