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

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

Issue 1422013002: Preparational work for an upcoming addition of a threadchecking scheme for APM (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@bundling_of_state_CL
Patch Set: Changes in response to user comments Created 5 years, 1 month 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 30 matching lines...) Expand all
41 case NoiseSuppression::kVeryHigh: 41 case NoiseSuppression::kVeryHigh:
42 return 3; 42 return 3;
43 } 43 }
44 assert(false); 44 assert(false);
45 return -1; 45 return -1;
46 } 46 }
47 } // namespace 47 } // namespace
48 48
49 NoiseSuppressionImpl::NoiseSuppressionImpl(const AudioProcessing* apm, 49 NoiseSuppressionImpl::NoiseSuppressionImpl(const AudioProcessing* apm,
50 CriticalSectionWrapper* crit) 50 CriticalSectionWrapper* crit)
51 : ProcessingComponent(), 51 : ProcessingComponent(), apm_(apm), crit_(crit), level_(kModerate) {}
hlundin-webrtc 2015/11/05 13:08:55 Leave this file out of the CL.
peah-webrtc 2015/11/06 07:31:14 It was initially included, but changes along the w
hlundin-webrtc 2015/11/06 07:45:07 That is the way to do it.
peah-webrtc 2015/11/06 08:11:47 Acknowledged.
52 apm_(apm),
53 crit_(crit),
54 level_(kModerate) {}
55 52
56 NoiseSuppressionImpl::~NoiseSuppressionImpl() {} 53 NoiseSuppressionImpl::~NoiseSuppressionImpl() {}
57 54
58 int NoiseSuppressionImpl::AnalyzeCaptureAudio(AudioBuffer* audio) { 55 int NoiseSuppressionImpl::AnalyzeCaptureAudio(AudioBuffer* audio) {
59 #if defined(WEBRTC_NS_FLOAT) 56 #if defined(WEBRTC_NS_FLOAT)
60 if (!is_component_enabled()) { 57 if (!is_component_enabled()) {
61 return apm_->kNoError; 58 return apm_->kNoError;
62 } 59 }
63 assert(audio->num_frames_per_band() <= 160); 60 assert(audio->num_frames_per_band() <= 160);
64 assert(audio->num_channels() == num_handles()); 61 assert(audio->num_channels() == num_handles());
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 int NoiseSuppressionImpl::num_handles_required() const { 169 int NoiseSuppressionImpl::num_handles_required() const {
173 return apm_->num_output_channels(); 170 return apm_->num_output_channels();
174 } 171 }
175 172
176 int NoiseSuppressionImpl::GetHandleError(void* handle) const { 173 int NoiseSuppressionImpl::GetHandleError(void* handle) const {
177 // The NS has no get_error() function. 174 // The NS has no get_error() function.
178 assert(handle != NULL); 175 assert(handle != NULL);
179 return apm_->kUnspecifiedError; 176 return apm_->kUnspecifiedError;
180 } 177 }
181 } // namespace webrtc 178 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698