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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
673 private_submodules_->agc_manager->AnalyzePreProcess( | 673 private_submodules_->agc_manager->AnalyzePreProcess( |
674 ca->channels()[0], ca->num_channels(), | 674 ca->channels()[0], ca->num_channels(), |
675 capture_nonlocked_.fwd_proc_format.num_frames()); | 675 capture_nonlocked_.fwd_proc_format.num_frames()); |
676 } | 676 } |
677 | 677 |
678 if (fwd_analysis_needed()) { | 678 if (fwd_analysis_needed()) { |
679 ca->SplitIntoFrequencyBands(); | 679 ca->SplitIntoFrequencyBands(); |
680 } | 680 } |
681 | 681 |
682 if (capture_nonlocked_.beamformer_enabled) { | 682 if (capture_nonlocked_.beamformer_enabled) { |
683 private_submodules_->beamformer->ProcessChunk(*ca->split_data_f(), | 683 private_submodules_->beamformer->ProcessChunk(*ca->split_data_f(), |
peah-webrtc
2016/05/26 08:48:53
If the ProcessChunk is made input-only, you shoul
aluebs-webrtc
2016/05/28 03:00:00
Because other Beamformers might do some processing
peah-webrtc
2016/05/30 11:49:25
Are there other beamformer implementations, apart
aluebs-webrtc
2016/06/01 00:16:34
There are no other beamformers in WebRTC at the mo
peah-webrtc
2016/06/01 14:51:01
I don't think we should write/keep code to support
aluebs-webrtc
2016/06/01 22:13:20
This whole CL is only to support "possibly upcomin
| |
684 ca->split_data_f()); | 684 ca->split_data_f()); |
685 ca->set_num_channels(1); | 685 ca->set_num_channels(1); |
peah-webrtc
2016/05/26 08:48:53
Please add a comment that this operation discards
aluebs-webrtc
2016/05/28 03:00:00
Done.
| |
686 } | 686 } |
687 | 687 |
688 public_submodules_->high_pass_filter->ProcessCaptureAudio(ca); | 688 public_submodules_->high_pass_filter->ProcessCaptureAudio(ca); |
689 RETURN_ON_ERR(public_submodules_->gain_control->AnalyzeCaptureAudio(ca)); | 689 RETURN_ON_ERR(public_submodules_->gain_control->AnalyzeCaptureAudio(ca)); |
690 public_submodules_->noise_suppression->AnalyzeCaptureAudio(ca); | 690 public_submodules_->noise_suppression->AnalyzeCaptureAudio(ca); |
691 | 691 |
692 // Ensure that the stream delay was set before the call to the | 692 // Ensure that the stream delay was set before the call to the |
693 // AEC ProcessCaptureAudio function. | 693 // AEC ProcessCaptureAudio function. |
694 if (public_submodules_->echo_cancellation->is_enabled() && | 694 if (public_submodules_->echo_cancellation->is_enabled() && |
695 !was_stream_delay_set()) { | 695 !was_stream_delay_set()) { |
(...skipping 19 matching lines...) Expand all Loading... | |
715 // Ensure that the stream delay was set before the call to the | 715 // Ensure that the stream delay was set before the call to the |
716 // AECM ProcessCaptureAudio function. | 716 // AECM ProcessCaptureAudio function. |
717 if (public_submodules_->echo_control_mobile->is_enabled() && | 717 if (public_submodules_->echo_control_mobile->is_enabled() && |
718 !was_stream_delay_set()) { | 718 !was_stream_delay_set()) { |
719 return AudioProcessing::kStreamParameterNotSetError; | 719 return AudioProcessing::kStreamParameterNotSetError; |
720 } | 720 } |
721 | 721 |
722 RETURN_ON_ERR(public_submodules_->echo_control_mobile->ProcessCaptureAudio( | 722 RETURN_ON_ERR(public_submodules_->echo_control_mobile->ProcessCaptureAudio( |
723 ca, stream_delay_ms())); | 723 ca, stream_delay_ms())); |
724 | 724 |
725 if (capture_nonlocked_.beamformer_enabled) { | |
726 private_submodules_->beamformer->PostFilter(ca->split_data_f()); | |
727 } | |
728 | |
725 public_submodules_->voice_detection->ProcessCaptureAudio(ca); | 729 public_submodules_->voice_detection->ProcessCaptureAudio(ca); |
726 | 730 |
727 if (constants_.use_experimental_agc && | 731 if (constants_.use_experimental_agc && |
728 public_submodules_->gain_control->is_enabled() && | 732 public_submodules_->gain_control->is_enabled() && |
729 (!capture_nonlocked_.beamformer_enabled || | 733 (!capture_nonlocked_.beamformer_enabled || |
730 private_submodules_->beamformer->is_target_present())) { | 734 private_submodules_->beamformer->is_target_present())) { |
731 private_submodules_->agc_manager->Process( | 735 private_submodules_->agc_manager->Process( |
732 ca->split_bands_const(0)[kBand0To8kHz], ca->num_frames_per_band(), | 736 ca->split_bands_const(0)[kBand0To8kHz], ca->num_frames_per_band(), |
733 capture_nonlocked_.split_rate); | 737 capture_nonlocked_.split_rate); |
734 } | 738 } |
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1461 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config); | 1465 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config); |
1462 | 1466 |
1463 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), | 1467 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), |
1464 &debug_dump_.num_bytes_left_for_log_, | 1468 &debug_dump_.num_bytes_left_for_log_, |
1465 &crit_debug_, &debug_dump_.capture)); | 1469 &crit_debug_, &debug_dump_.capture)); |
1466 return kNoError; | 1470 return kNoError; |
1467 } | 1471 } |
1468 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP | 1472 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP |
1469 | 1473 |
1470 } // namespace webrtc | 1474 } // namespace webrtc |
OLD | NEW |