OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 #include "webrtc/modules/audio_processing/aec3/echo_canceller3.h" | 10 #include "webrtc/modules/audio_processing/aec3/echo_canceller3.h" |
(...skipping 242 matching lines...) Loading... | |
253 | 253 |
254 bool EchoCanceller3::AnalyzeRender(AudioBuffer* render) { | 254 bool EchoCanceller3::AnalyzeRender(AudioBuffer* render) { |
255 RTC_DCHECK_RUNS_SERIALIZED(&render_race_checker_); | 255 RTC_DCHECK_RUNS_SERIALIZED(&render_race_checker_); |
256 RTC_DCHECK(render); | 256 RTC_DCHECK(render); |
257 return render_writer_->Insert(render); | 257 return render_writer_->Insert(render); |
258 } | 258 } |
259 | 259 |
260 void EchoCanceller3::AnalyzeCapture(AudioBuffer* capture) { | 260 void EchoCanceller3::AnalyzeCapture(AudioBuffer* capture) { |
261 RTC_DCHECK_RUNS_SERIALIZED(&capture_race_checker_); | 261 RTC_DCHECK_RUNS_SERIALIZED(&capture_race_checker_); |
262 RTC_DCHECK(capture); | 262 RTC_DCHECK(capture); |
263 data_dumper_->DumpWav("aec3_capture_analyze_input", frame_length_, | 263 data_dumper_->DumpWav("aec3_capture_analyze_input", capture->num_frames(), |
peah-webrtc
2017/02/27 14:26:03
The framelength was wrong here before.
| |
264 capture->channels_f()[0], sample_rate_hz_, 1); | 264 capture->channels_f()[0], sample_rate_hz_, 1); |
265 | 265 |
266 saturated_microphone_signal_ = false; | 266 saturated_microphone_signal_ = false; |
267 for (size_t k = 0; k < capture->num_channels(); ++k) { | 267 for (size_t k = 0; k < capture->num_channels(); ++k) { |
268 saturated_microphone_signal_ |= | 268 saturated_microphone_signal_ |= |
269 DetectSaturation(rtc::ArrayView<const float>(capture->channels_f()[k], | 269 DetectSaturation(rtc::ArrayView<const float>(capture->channels_f()[k], |
270 capture->num_frames())); | 270 capture->num_frames())); |
271 if (saturated_microphone_signal_) { | 271 if (saturated_microphone_signal_) { |
272 break; | 272 break; |
273 } | 273 } |
(...skipping 78 matching lines...) Loading... | |
352 block_processor_.get(), &block_) && | 352 block_processor_.get(), &block_) && |
353 successful_buffering; | 353 successful_buffering; |
354 | 354 |
355 frame_to_buffer = | 355 frame_to_buffer = |
356 render_transfer_queue_.Remove(&render_queue_output_frame_); | 356 render_transfer_queue_.Remove(&render_queue_output_frame_); |
357 } | 357 } |
358 return successful_buffering; | 358 return successful_buffering; |
359 } | 359 } |
360 | 360 |
361 } // namespace webrtc | 361 } // namespace webrtc |
OLD | NEW |