From a3863d5834d5d21edf2e2aa9c42a3bdb44c25b51 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 16 Mar 2016 01:36:57 -0700 Subject: Add config options to enable the hq ambisonic decoder --- Alc/ALc.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Alc/ALc.c') 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]); -- cgit v1.2.3