Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2168)

Unified Diff: chrome/browser/copresence/chrome_whispernet_client_browsertest.cc

Issue 1018093002: Using AudioBus::ZeroFramesPartial() instead of manual zeroing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/copresence/chrome_whispernet_client_browsertest.cc
diff --git a/chrome/browser/copresence/chrome_whispernet_client_browsertest.cc b/chrome/browser/copresence/chrome_whispernet_client_browsertest.cc
index 4aa9b832abddb1d06d38b588183c88cfd4e08297..173213959d66ba3efbc747545a37a6256ae65e16 100644
--- a/chrome/browser/copresence/chrome_whispernet_client_browsertest.cc
+++ b/chrome/browser/copresence/chrome_whispernet_client_browsertest.cc
@@ -214,9 +214,9 @@ class ChromeWhispernetClientTest : public ExtensionBrowserTest,
saved_samples_index_ += frames_to_copy;
// Pad any remaining space with zeroes.
- for (int i = remaining_frames; i < dest->frames(); i++) {
- for (int c = 0; c < dest->channels(); c++)
- dest->channel(c)[i] = 0;
+ if (remaining_frames < dest->frames()) {
+ dest->ZeroFramesPartial(remaining_frames,
+ dest->frames() - remaining_frames);
}
// Return the volume level.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698