Avoid an implied else if check

This commit is contained in:
Chris Robinson
2019-06-16 22:45:07 -07:00
parent a009b9502a
commit 21b8571f50
+3 -7
View File
@@ -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));
}