diff options
author | Chris Robinson <[email protected]> | 2022-08-08 03:44:25 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-08-08 03:44:25 -0700 |
commit | 7e5dd4196846f61307e156d55ae0fc12fbd29512 (patch) | |
tree | ac818d0bcde0328b13fbe563a5a6d3fa82a605d7 /core/voice.cpp | |
parent | 250f1624964c2c53e00d18fd1ec2bbc77c860298 (diff) |
Add an option for higher quality UHJ filters
Diffstat (limited to 'core/voice.cpp')
-rw-r--r-- | core/voice.cpp | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/core/voice.cpp b/core/voice.cpp index 15230726..4030fc5b 100644 --- a/core/voice.cpp +++ b/core/voice.cpp @@ -854,13 +854,29 @@ void Voice::prepare(DeviceBase *device) if(mFmtChannels == FmtSuperStereo) { - mDecoder = std::make_unique<UhjStereoDecoder<UhjLengthStd>>(); - mDecoderPadding = UhjStereoDecoder<UhjLengthStd>::sFilterDelay; + if(UhjQuality >= UhjLengthHq) + { + mDecoder = std::make_unique<UhjStereoDecoder<UhjLengthHq>>(); + mDecoderPadding = UhjStereoDecoder<UhjLengthHq>::sFilterDelay; + } + else + { + mDecoder = std::make_unique<UhjStereoDecoder<UhjLengthLq>>(); + mDecoderPadding = UhjStereoDecoder<UhjLengthLq>::sFilterDelay; + } } else if(IsUHJ(mFmtChannels)) { - mDecoder = std::make_unique<UhjDecoder<UhjLengthStd>>(); - mDecoderPadding = UhjDecoder<UhjLengthStd>::sFilterDelay; + if(UhjQuality >= UhjLengthHq) + { + mDecoder = std::make_unique<UhjDecoder<UhjLengthHq>>(); + mDecoderPadding = UhjDecoder<UhjLengthHq>::sFilterDelay; + } + else + { + mDecoder = std::make_unique<UhjDecoder<UhjLengthLq>>(); + mDecoderPadding = UhjDecoder<UhjLengthLq>::sFilterDelay; + } } else { |