aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-06-16 22:45:07 -0700
committerChris Robinson <[email protected]>2019-06-16 22:45:07 -0700
commit21b8571f50d8d9959282b652eea45759e98ede55 (patch)
treeac298cebb93c6c7885e2d66ba1dab0483020fb72
parenta009b9502a59658f4e60b4c8c6313fa5d7b6dd46 (diff)
Avoid an implied else if check
-rw-r--r--Alc/converter.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/Alc/converter.cpp b/Alc/converter.cpp
index a6a5f2c4..a36d05ad 100644
--- a/Alc/converter.cpp
+++ b/Alc/converter.cpp
@@ -333,12 +333,6 @@ ChannelConverterPtr CreateChannelConverter(DevFmtType srcType, DevFmtChannels sr
void ChannelConverter::convert(const ALvoid *src, ALfloat *dst, ALsizei frames) const
{
- if(mSrcChans == mDstChans)
- {
- LoadSamples(dst, src, 1u, mSrcType, frames*ChannelsFromDevFmt(mSrcChans, 0));
- return;
- }
-
if(mSrcChans == DevFmtStereo && mDstChans == DevFmtMono)
{
switch(mSrcType)
@@ -354,7 +348,7 @@ void ChannelConverter::convert(const ALvoid *src, ALfloat *dst, ALsizei frames)
#undef HANDLE_FMT
}
}
- else /*if(mSrcChans == DevFmtMono && mDstChans == DevFmtStereo)*/
+ else if(mSrcChans == DevFmtMono && mDstChans == DevFmtStereo)
{
switch(mSrcType)
{
@@ -369,4 +363,6 @@ void ChannelConverter::convert(const ALvoid *src, ALfloat *dst, ALsizei frames)
#undef HANDLE_FMT
}
}
+ else
+ LoadSamples(dst, src, 1u, mSrcType, frames*ChannelsFromDevFmt(mSrcChans, 0));
}