OLD | NEW |
---|---|
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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
156 NoiseSuppressionImpl* noise_suppression_; | 156 NoiseSuppressionImpl* noise_suppression_; |
157 VoiceDetectionImpl* voice_detection_; | 157 VoiceDetectionImpl* voice_detection_; |
158 rtc::scoped_ptr<GainControlForNewAgc> gain_control_for_new_agc_; | 158 rtc::scoped_ptr<GainControlForNewAgc> gain_control_for_new_agc_; |
159 | 159 |
160 std::list<ProcessingComponent*> component_list_; | 160 std::list<ProcessingComponent*> component_list_; |
161 CriticalSectionWrapper* crit_; | 161 CriticalSectionWrapper* crit_; |
162 rtc::scoped_ptr<AudioBuffer> render_audio_; | 162 rtc::scoped_ptr<AudioBuffer> render_audio_; |
163 rtc::scoped_ptr<AudioBuffer> capture_audio_; | 163 rtc::scoped_ptr<AudioBuffer> capture_audio_; |
164 rtc::scoped_ptr<AudioConverter> render_converter_; | 164 rtc::scoped_ptr<AudioConverter> render_converter_; |
165 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP | 165 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP |
166 struct ApmConfig { | |
Andrew MacDonald
2015/09/26 02:36:19
Why do you need this thing?
minyue-webrtc
2015/09/26 16:26:44
Ivo had a good suggestion. It is now removed
| |
167 bool operator!=(const ApmConfig &rhs) const { | |
168 return ( | |
169 // AEC | |
peah-webrtc
2015/09/25 10:27:38
I think the style guide says that comments should
| |
170 this->aec_enabled != rhs.aec_enabled || | |
171 this->aec_delay_agnostic != rhs.aec_delay_agnostic || | |
172 this->aec_drift_compensation != rhs.aec_drift_compensation || | |
173 this->aec_extended_filter != rhs.aec_extended_filter || | |
174 this->aec_suppression_level != rhs.aec_suppression_level || | |
175 // AEC mobile | |
176 this->aecm_enabled != rhs.aecm_enabled || | |
177 this->aecm_comfort_noise != rhs.aecm_comfort_noise || | |
178 this->aecm_routing_mode != rhs.aecm_routing_mode || | |
179 /// AGC | |
180 this->agc_enabled != rhs.agc_enabled || | |
181 this->agc_experiment != rhs.agc_experiment || | |
182 this->agc_mode != rhs.agc_mode || | |
183 this->agc_limiter != rhs.agc_limiter || | |
184 // HPF | |
185 this->hpf_enabled != rhs.hpf_enabled || | |
186 // NS | |
187 this->ns_enabled != rhs.ns_enabled || | |
188 this->ns_experiment != rhs.ns_experiment || | |
189 this->ns_level != rhs.ns_level); | |
190 } | |
191 // Acoustic echo canceler | |
192 bool aec_enabled; | |
193 bool aec_delay_agnostic; | |
194 bool aec_drift_compensation; | |
195 bool aec_extended_filter; | |
196 EchoCancellation::SuppressionLevel aec_suppression_level; | |
197 // Mobile AEC | |
198 bool aecm_enabled; | |
199 bool aecm_comfort_noise; | |
200 EchoControlMobile::RoutingMode aecm_routing_mode; | |
201 // Automatic gain controller | |
202 bool agc_enabled; | |
203 bool agc_experiment; | |
204 GainControl::Mode agc_mode; | |
205 bool agc_limiter; | |
206 // High pass filter | |
207 bool hpf_enabled; | |
208 // Noise suppression | |
209 bool ns_enabled; | |
210 bool ns_experiment; | |
211 NoiseSuppression::Level ns_level; | |
212 }; // Configurations of APM components. | |
213 | |
166 // TODO(andrew): make this more graceful. Ideally we would split this stuff | 214 // TODO(andrew): make this more graceful. Ideally we would split this stuff |
167 // out into a separate class with an "enabled" and "disabled" implementation. | 215 // out into a separate class with an "enabled" and "disabled" implementation. |
168 int WriteMessageToDebugFile(); | 216 int WriteMessageToDebugFile(); |
169 int WriteInitMessage(); | 217 int WriteInitMessage(); |
218 int WriteConfigMessage(); | |
219 ApmConfig GetCurrentConfig() const; | |
170 rtc::scoped_ptr<FileWrapper> debug_file_; | 220 rtc::scoped_ptr<FileWrapper> debug_file_; |
171 rtc::scoped_ptr<audioproc::Event> event_msg_; // Protobuf message. | 221 rtc::scoped_ptr<audioproc::Event> event_msg_; // Protobuf message. |
172 std::string event_str_; // Memory for protobuf serialization. | 222 std::string event_str_; // Memory for protobuf serialization. |
223 ApmConfig config_; | |
173 #endif | 224 #endif |
174 | 225 |
175 // Format of processing streams at input/output call sites. | 226 // Format of processing streams at input/output call sites. |
176 ProcessingConfig api_format_; | 227 ProcessingConfig api_format_; |
177 | 228 |
178 // Only the rate and samples fields of fwd_proc_format_ are used because the | 229 // Only the rate and samples fields of fwd_proc_format_ are used because the |
179 // forward processing number of channels is mutable and is tracked by the | 230 // forward processing number of channels is mutable and is tracked by the |
180 // capture_audio_. | 231 // capture_audio_. |
181 StreamConfig fwd_proc_format_; | 232 StreamConfig fwd_proc_format_; |
182 StreamConfig rev_proc_format_; | 233 StreamConfig rev_proc_format_; |
(...skipping 22 matching lines...) Expand all Loading... | |
205 rtc::scoped_ptr<Beamformer<float>> beamformer_; | 256 rtc::scoped_ptr<Beamformer<float>> beamformer_; |
206 const std::vector<Point> array_geometry_; | 257 const std::vector<Point> array_geometry_; |
207 | 258 |
208 bool intelligibility_enabled_; | 259 bool intelligibility_enabled_; |
209 rtc::scoped_ptr<IntelligibilityEnhancer> intelligibility_enhancer_; | 260 rtc::scoped_ptr<IntelligibilityEnhancer> intelligibility_enhancer_; |
210 }; | 261 }; |
211 | 262 |
212 } // namespace webrtc | 263 } // namespace webrtc |
213 | 264 |
214 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ | 265 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ |
OLD | NEW |