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

Side by Side Diff: webrtc/modules/audio_processing/gain_control_impl.cc

Issue 1534193008: Misc. small cleanups (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Unnecessary parens Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // Read chunks of data that were received and queued on the render side from 104 // Read chunks of data that were received and queued on the render side from
105 // a queue. All the data chunks are buffered into the farend signal of the AGC. 105 // a queue. All the data chunks are buffered into the farend signal of the AGC.
106 void GainControlImpl::ReadQueuedRenderData() { 106 void GainControlImpl::ReadQueuedRenderData() {
107 rtc::CritScope cs(crit_capture_); 107 rtc::CritScope cs(crit_capture_);
108 108
109 if (!is_component_enabled()) { 109 if (!is_component_enabled()) {
110 return; 110 return;
111 } 111 }
112 112
113 while (render_signal_queue_->Remove(&capture_queue_buffer_)) { 113 while (render_signal_queue_->Remove(&capture_queue_buffer_)) {
114 int buffer_index = 0; 114 size_t buffer_index = 0;
115 const int num_frames_per_band = 115 const size_t num_frames_per_band =
116 capture_queue_buffer_.size() / num_handles(); 116 capture_queue_buffer_.size() / num_handles();
117 for (int i = 0; i < num_handles(); i++) { 117 for (int i = 0; i < num_handles(); i++) {
118 Handle* my_handle = static_cast<Handle*>(handle(i)); 118 Handle* my_handle = static_cast<Handle*>(handle(i));
119 WebRtcAgc_AddFarend(my_handle, &capture_queue_buffer_[buffer_index], 119 WebRtcAgc_AddFarend(my_handle, &capture_queue_buffer_[buffer_index],
120 num_frames_per_band); 120 num_frames_per_band);
121 121
122 buffer_index += num_frames_per_band; 122 buffer_index += num_frames_per_band;
123 } 123 }
124 } 124 }
125 } 125 }
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 return apm_->num_output_channels(); 438 return apm_->num_output_channels();
439 } 439 }
440 440
441 int GainControlImpl::GetHandleError(void* handle) const { 441 int GainControlImpl::GetHandleError(void* handle) const {
442 // The AGC has no get_error() function. 442 // The AGC has no get_error() function.
443 // (Despite listing errors in its interface...) 443 // (Despite listing errors in its interface...)
444 assert(handle != NULL); 444 assert(handle != NULL);
445 return AudioProcessing::kUnspecifiedError; 445 return AudioProcessing::kUnspecifiedError;
446 } 446 }
447 } // namespace webrtc 447 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/echo_control_mobile_impl.cc ('k') | webrtc/modules/audio_processing/noise_suppression_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698