From 5732ecb6cb29070625d0a6a0f36399aac6b23750 Mon Sep 17 00:00:00 2001 From: Craig Matthew Grubb Date: Mon, 4 Dec 2023 08:02:46 +0000 Subject: [PATCH] Bug 1862504 - Removed 'else' after 'return' for code readability. r=alwu,sylvestre Differential Revision: https://phabricator.services.mozilla.com/D194710 --- dom/media/AudioConverter.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dom/media/AudioConverter.cpp b/dom/media/AudioConverter.cpp index 1f5860804318..9f2c32ceedba 100644 --- a/dom/media/AudioConverter.cpp +++ b/dom/media/AudioConverter.cpp @@ -75,11 +75,16 @@ size_t AudioConverter::ProcessInternal(void* aOut, const void* aIn, if (!aFrames) { return 0; } + if (mIn.Channels() > mOut.Channels()) { return DownmixAudio(aOut, aIn, aFrames); - } else if (mIn.Channels() < mOut.Channels()) { + } + + if (mIn.Channels() < mOut.Channels()) { return UpmixAudio(aOut, aIn, aFrames); - } else if (mIn.Layout() != mOut.Layout() && CanReorderAudio()) { + } + + if (mIn.Layout() != mOut.Layout() && CanReorderAudio()) { ReOrderInterleavedChannels(aOut, aIn, aFrames); } else if (aIn != aOut) { memmove(aOut, aIn, FramesOutToBytes(aFrames));