[tbb-commits] [tor-browser] 23/34: Bug 1762620 - Only pad audio buffers when doing up mixing. r=alwu, a=dsmith
gitolite role
git at cupani.torproject.org
Wed Apr 27 16:05:04 UTC 2022
This is an automated email from the git hooks/post-receive script.
richard pushed a commit to branch tor-browser-91.9esr-11.0-1
in repository tor-browser.
commit 520de8913f9849ee5d333ed9f50a4be25cfb51bc
Author: Paul Adenot <paul at paul.cx>
AuthorDate: Fri Apr 22 13:19:01 2022 +0000
Bug 1762620 - Only pad audio buffers when doing up mixing. r=alwu,a=dsmith
Differential Revision: https://phabricator.services.mozilla.com/D143623
---
dom/media/AudioConverter.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dom/media/AudioConverter.cpp b/dom/media/AudioConverter.cpp
index d2eb7335a997f..1f5860804318e 100644
--- a/dom/media/AudioConverter.cpp
+++ b/dom/media/AudioConverter.cpp
@@ -156,8 +156,10 @@ static void dumbUpDownMix(TYPE* aOut, int32_t aOutChannels, const TYPE* aIn,
for (int32_t j = 0; j < commonChannels; j++) {
aOut[i * aOutChannels + j] = aIn[i * aInChannels + j];
}
- for (int32_t j = 0; j < aInChannels - aOutChannels; j++) {
- aOut[i * aOutChannels + j] = 0;
+ if (aOutChannels > aInChannels) {
+ for (int32_t j = 0; j < aInChannels - aOutChannels; j++) {
+ aOut[i * aOutChannels + j] = 0;
+ }
}
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the tbb-commits
mailing list