From ccba33169bfcdc0dd64c6e9f854a34e05cdb20da Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 21 Nov 2014 14:35:19 -0800 Subject: [PATCH] Initialize panning after setting up HRTF --- Alc/ALc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Alc/ALc.c b/Alc/ALc.c index 915a03ef..f83a884c 100644 --- a/Alc/ALc.c +++ b/Alc/ALc.c @@ -1956,10 +1956,6 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) DevFmtTypeString(device->FmtType), device->Frequency, device->UpdateSize, device->NumUpdates); - aluInitPanning(device); - - V(device->Synth,update)(device); - device->Hrtf = NULL; if((device->Flags&DEVICE_HRTF_REQUEST)) { @@ -1996,14 +1992,18 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) WARN("NEON performs best with multiple of 4 update sizes (%u)\n", device->UpdateSize); } + aluInitPanning(device); + al_free(device->DryBuffer); device->DryBuffer = al_calloc(16, sizeof(device->DryBuffer[0]) * device->NumChannels); if(!device->DryBuffer) { - ERR("Failed to allocate "SZFMT"-byte mix buffer\n", sizeof(device->DryBuffer[0]) * device->NumChannels); + ERR("Failed to allocate "SZFMT" bytes for mix buffer\n", sizeof(device->DryBuffer[0]) * device->NumChannels); return ALC_INVALID_DEVICE; } + V(device->Synth,update)(device); + SetMixerFPUMode(&oldMode); V0(device->Backend,lock)(); context = ATOMIC_LOAD(&device->ContextList); -- 2.11.4.GIT