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

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

Issue 2902723002: Preserve level controller output when no other effects are active (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 } 233 }
234 234
235 bool AudioProcessingImpl::ApmSubmoduleStates::CaptureMultiBandProcessingActive() 235 bool AudioProcessingImpl::ApmSubmoduleStates::CaptureMultiBandProcessingActive()
236 const { 236 const {
237 return low_cut_filter_enabled_ || echo_canceller_enabled_ || 237 return low_cut_filter_enabled_ || echo_canceller_enabled_ ||
238 mobile_echo_controller_enabled_ || noise_suppressor_enabled_ || 238 mobile_echo_controller_enabled_ || noise_suppressor_enabled_ ||
239 beamformer_enabled_ || adaptive_gain_controller_enabled_ || 239 beamformer_enabled_ || adaptive_gain_controller_enabled_ ||
240 echo_canceller3_enabled_; 240 echo_canceller3_enabled_;
241 } 241 }
242 242
243 bool AudioProcessingImpl::ApmSubmoduleStates::CaptureFullBandProcessingActive()
244 const {
245 return level_controller_enabled_;
246 }
247
243 bool AudioProcessingImpl::ApmSubmoduleStates::RenderMultiBandSubModulesActive() 248 bool AudioProcessingImpl::ApmSubmoduleStates::RenderMultiBandSubModulesActive()
244 const { 249 const {
245 return RenderMultiBandProcessingActive() || echo_canceller_enabled_ || 250 return RenderMultiBandProcessingActive() || echo_canceller_enabled_ ||
246 mobile_echo_controller_enabled_ || adaptive_gain_controller_enabled_ || 251 mobile_echo_controller_enabled_ || adaptive_gain_controller_enabled_ ||
247 echo_canceller3_enabled_; 252 echo_canceller3_enabled_;
248 } 253 }
249 254
250 bool AudioProcessingImpl::ApmSubmoduleStates::RenderMultiBandProcessingActive() 255 bool AudioProcessingImpl::ApmSubmoduleStates::RenderMultiBandProcessingActive()
251 const { 256 const {
252 #if WEBRTC_INTELLIGIBILITY_ENHANCER 257 #if WEBRTC_INTELLIGIBILITY_ENHANCER
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 audioproc::Stream* msg = debug_dump_.capture.event_msg->mutable_stream(); 1131 audioproc::Stream* msg = debug_dump_.capture.event_msg->mutable_stream();
1127 const size_t data_size = 1132 const size_t data_size =
1128 sizeof(int16_t) * frame->samples_per_channel_ * frame->num_channels_; 1133 sizeof(int16_t) * frame->samples_per_channel_ * frame->num_channels_;
1129 msg->set_input_data(frame->data_, data_size); 1134 msg->set_input_data(frame->data_, data_size);
1130 } 1135 }
1131 #endif 1136 #endif
1132 1137
1133 capture_.capture_audio->DeinterleaveFrom(frame); 1138 capture_.capture_audio->DeinterleaveFrom(frame);
1134 RETURN_ON_ERR(ProcessCaptureStreamLocked()); 1139 RETURN_ON_ERR(ProcessCaptureStreamLocked());
1135 capture_.capture_audio->InterleaveTo( 1140 capture_.capture_audio->InterleaveTo(
1136 frame, submodule_states_.CaptureMultiBandProcessingActive()); 1141 frame, submodule_states_.CaptureMultiBandProcessingActive() ||
1142 submodule_states_.CaptureFullBandProcessingActive());
1137 1143
1138 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP 1144 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP
1139 if (debug_dump_.debug_file->is_open()) { 1145 if (debug_dump_.debug_file->is_open()) {
1140 audioproc::Stream* msg = debug_dump_.capture.event_msg->mutable_stream(); 1146 audioproc::Stream* msg = debug_dump_.capture.event_msg->mutable_stream();
1141 const size_t data_size = 1147 const size_t data_size =
1142 sizeof(int16_t) * frame->samples_per_channel_ * frame->num_channels_; 1148 sizeof(int16_t) * frame->samples_per_channel_ * frame->num_channels_;
1143 msg->set_output_data(frame->data_, data_size); 1149 msg->set_output_data(frame->data_, data_size);
1144 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), 1150 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(),
1145 &debug_dump_.num_bytes_left_for_log_, 1151 &debug_dump_.num_bytes_left_for_log_,
1146 &crit_debug_, &debug_dump_.capture)); 1152 &crit_debug_, &debug_dump_.capture));
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
2064 previous_agc_level(0), 2070 previous_agc_level(0),
2065 echo_path_gain_change(false) {} 2071 echo_path_gain_change(false) {}
2066 2072
2067 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; 2073 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default;
2068 2074
2069 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; 2075 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default;
2070 2076
2071 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; 2077 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default;
2072 2078
2073 } // namespace webrtc 2079 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698