From 7a91637d483210404935fc0b859bc886097a058e Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 21 Oct 2022 23:33:06 -0700 Subject: Add separate filter options for UHJ encoding and decoding --- alc/panning.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'alc/panning.cpp') diff --git a/alc/panning.cpp b/alc/panning.cpp index 0e6b68d4..bed27dec 100644 --- a/alc/panning.cpp +++ b/alc/panning.cpp @@ -1060,10 +1060,20 @@ void aluInitRenderer(ALCdevice *device, int hrtf_id, al::optionalmUhjEncoder = std::make_unique>(); - else + switch(UhjEncodeQuality) + { + case UhjQualityType::IIR: + device->mUhjEncoder = std::make_unique(); + break; + case UhjQualityType::FIR256: device->mUhjEncoder = std::make_unique>(); + break; + case UhjQualityType::FIR512: + device->mUhjEncoder = std::make_unique>(); + break; + } + assert(device->mUhjEncoder != nullptr); + TRACE("UHJ enabled\n"); InitUhjPanning(device); device->PostProcess = &ALCdevice::ProcessUhj; -- cgit v1.2.3