Make sure the BS2B filter is freed if HRTF is enabled

This commit is contained in:
Chris Robinson
2015-02-09 05:56:37 -08:00
parent 61755f35c1
commit a925fb8111
+4
View File
@@ -2004,7 +2004,11 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
if(usehrtf)
device->Hrtf = GetHrtf(device->FmtChans, device->Frequency);
if(device->Hrtf)
{
TRACE("HRTF enabled\n");
free(device->Bs2b);
device->Bs2b = NULL;
}
else
{
device->Flags &= ~DEVICE_HRTF_REQUEST;