aboutsummaryrefslogtreecommitdiffstats
path: root/alc/panning.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-10-21 23:33:06 -0700
committerChris Robinson <[email protected]>2022-10-21 23:33:06 -0700
commit7a91637d483210404935fc0b859bc886097a058e (patch)
tree44c0b3a28999be552953ef7bf36ab38832e8d448 /alc/panning.cpp
parentee40a2e7e4867a769765d447a15ac88832eb8aa0 (diff)
Add separate filter options for UHJ encoding and decoding
Diffstat (limited to 'alc/panning.cpp')
-rw-r--r--alc/panning.cpp16
1 files changed, 13 insertions, 3 deletions
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::optional<StereoEncoding
if(stereomode.value_or(StereoEncoding::Default) == StereoEncoding::Uhj)
{
- if(UhjQuality != UhjQualityType::FIR256)
- device->mUhjEncoder = std::make_unique<UhjEncoder<UhjLengthHq>>();
- else
+ switch(UhjEncodeQuality)
+ {
+ case UhjQualityType::IIR:
+ device->mUhjEncoder = std::make_unique<UhjEncoderIIR>();
+ break;
+ case UhjQualityType::FIR256:
device->mUhjEncoder = std::make_unique<UhjEncoder<UhjLengthLq>>();
+ break;
+ case UhjQualityType::FIR512:
+ device->mUhjEncoder = std::make_unique<UhjEncoder<UhjLengthHq>>();
+ break;
+ }
+ assert(device->mUhjEncoder != nullptr);
+
TRACE("UHJ enabled\n");
InitUhjPanning(device);
device->PostProcess = &ALCdevice::ProcessUhj;