Reinitialize the stereo-to-binaural filter after resetting the device

This commit is contained in:
Chris Robinson
2009-09-21 23:25:26 -07:00
parent a2edc95207
commit 62cef44dcb
+9 -9
View File
@@ -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