aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-09-21 23:25:26 -0700
committerChris Robinson <[email protected]>2009-09-21 23:25:26 -0700
commit62cef44dcbb5368d383e45ba6201e0bfbce09612 (patch)
tree2cb8131fa6735559dfdb295012878d64193eb67c /Alc
parenta2edc95207b798f43ff6704c993617bb67e738f9 (diff)
Reinitialize the stereo-to-binaural filter after resetting the device
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index e5cb8f6b..07190754 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -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