aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index f51757e8..ffb20442 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -2118,7 +2118,18 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
}
}
- aluInitPanning(device, NULL);
+ if(!device->Hrtf && !device->Uhj_Encoder &&
+ GetConfigValueBool(al_string_get_cstr(device->DeviceName), "ambisonics", "hq-mode", 1))
+ {
+ if(!device->AmbiDecoder)
+ device->AmbiDecoder = bformatdec_alloc();
+ }
+ else
+ {
+ bformatdec_free(device->AmbiDecoder);
+ device->AmbiDecoder = NULL;
+ }
+ aluInitPanning(device);
/* Allocate extra channels for any post-filter output. */
size = device->Dry.NumChannels * sizeof(device->Dry.Buffer[0]);