| 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 std::string EchoCanceller3::ToString( | 327 std::string EchoCanceller3::ToString( |
| 328 const AudioProcessing::Config::EchoCanceller3& config) { | 328 const AudioProcessing::Config::EchoCanceller3& config) { |
| 329 std::stringstream ss; | 329 std::stringstream ss; |
| 330 ss << "{" | 330 ss << "{" |
| 331 << "enabled: " << (config.enabled ? "true" : "false") << "}"; | 331 << "enabled: " << (config.enabled ? "true" : "false") << "}"; |
| 332 return ss.str(); | 332 return ss.str(); |
| 333 } | 333 } |
| 334 | 334 |
| 335 bool EchoCanceller3::Validate( | 335 bool EchoCanceller3::Validate( |
| 336 const AudioProcessing::Config::EchoCanceller3& config) { | 336 const AudioProcessing::Config::EchoCanceller3& config) { |
| 337 return (config.echo_decay >= 0.f && config.echo_decay < 1.f); | 337 return true; |
| 338 } | 338 } |
| 339 | 339 |
| 340 void EchoCanceller3::EmptyRenderQueue() { | 340 void EchoCanceller3::EmptyRenderQueue() { |
| 341 RTC_DCHECK_RUNS_SERIALIZED(&capture_race_checker_); | 341 RTC_DCHECK_RUNS_SERIALIZED(&capture_race_checker_); |
| 342 bool frame_to_buffer = | 342 bool frame_to_buffer = |
| 343 render_transfer_queue_.Remove(&render_queue_output_frame_); | 343 render_transfer_queue_.Remove(&render_queue_output_frame_); |
| 344 while (frame_to_buffer) { | 344 while (frame_to_buffer) { |
| 345 BufferRenderFrameContent(&render_queue_output_frame_, 0, &render_blocker_, | 345 BufferRenderFrameContent(&render_queue_output_frame_, 0, &render_blocker_, |
| 346 block_processor_.get(), &block_, &sub_frame_view_); | 346 block_processor_.get(), &block_, &sub_frame_view_); |
| 347 | 347 |
| 348 if (sample_rate_hz_ != 8000) { | 348 if (sample_rate_hz_ != 8000) { |
| 349 BufferRenderFrameContent(&render_queue_output_frame_, 1, &render_blocker_, | 349 BufferRenderFrameContent(&render_queue_output_frame_, 1, &render_blocker_, |
| 350 block_processor_.get(), &block_, | 350 block_processor_.get(), &block_, |
| 351 &sub_frame_view_); | 351 &sub_frame_view_); |
| 352 } | 352 } |
| 353 | 353 |
| 354 BufferRemainingRenderFrameContent(&render_blocker_, block_processor_.get(), | 354 BufferRemainingRenderFrameContent(&render_blocker_, block_processor_.get(), |
| 355 &block_); | 355 &block_); |
| 356 | 356 |
| 357 frame_to_buffer = | 357 frame_to_buffer = |
| 358 render_transfer_queue_.Remove(&render_queue_output_frame_); | 358 render_transfer_queue_.Remove(&render_queue_output_frame_); |
| 359 } | 359 } |
| 360 } | 360 } |
| 361 | 361 |
| 362 } // namespace webrtc | 362 } // namespace webrtc |
| OLD | NEW |