diff options
author | Chris Robinson <[email protected]> | 2021-03-31 10:03:31 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2021-03-31 10:03:31 -0700 |
commit | b5e36007f136f817e6d14685377e781e224daf17 (patch) | |
tree | 2b16156169cba4f4139ff16391e619f49fedce80 /alc/voice.cpp | |
parent | 35a0f2665f834c107e39ec2dcfc3d9ae0a0b33ce (diff) |
Handle 3-channel UHJ audio buffers
Diffstat (limited to 'alc/voice.cpp')
-rw-r--r-- | alc/voice.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/alc/voice.cpp b/alc/voice.cpp index c3e3dca2..577d5f72 100644 --- a/alc/voice.cpp +++ b/alc/voice.cpp @@ -529,7 +529,7 @@ void Voice::mix(const State vstate, ALCcontext *Context, const uint SamplesToDo) Counter = std::min(Counter, 64u); const uint PostPadding{MaxResamplerEdge + - ((mFmtChannels==FmtUHJ2) ? uint{UhjDecoder::sFilterDelay} : 0u)}; + ((mFmtChannels==FmtUHJ2 || mFmtChannels==FmtUHJ3) ? uint{UhjDecoder::sFilterDelay} : 0u)}; uint buffers_done{0u}; uint OutPos{0u}; do { @@ -823,9 +823,9 @@ void Voice::mix(const State vstate, ALCcontext *Context, const uint SamplesToDo) void Voice::prepare(ALCdevice *device) { - if(mFmtChannels == FmtUHJ2 && !mDecoder) + if((mFmtChannels == FmtUHJ2 || mFmtChannels == FmtUHJ3) && !mDecoder) mDecoder = std::make_unique<UhjDecoder>(); - else if(mFmtChannels != FmtUHJ2) + else if(mFmtChannels != FmtUHJ2 && mFmtChannels != FmtUHJ3) mDecoder = nullptr; /* Clear the stepping value explicitly so the mixer knows not to mix this |