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 1795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1806 format_string = "_int"; | 1806 format_string = "_int"; |
1807 break; | 1807 break; |
1808 case kFloatFormat: | 1808 case kFloatFormat: |
1809 format_string = "_float"; | 1809 format_string = "_float"; |
1810 break; | 1810 break; |
1811 } | 1811 } |
1812 const std::string ref_filename = test::TempFilename( | 1812 const std::string ref_filename = test::TempFilename( |
1813 test::OutputPath(), std::string("ref") + format_string + "_aecdump"); | 1813 test::OutputPath(), std::string("ref") + format_string + "_aecdump"); |
1814 const std::string out_filename = test::TempFilename( | 1814 const std::string out_filename = test::TempFilename( |
1815 test::OutputPath(), std::string("out") + format_string + "_aecdump"); | 1815 test::OutputPath(), std::string("out") + format_string + "_aecdump"); |
1816 EnableAllComponents(); | 1816 |
1817 #if defined(WEBRTC_AUDIOPROC_FIXED_PROFILE) | |
1818 EXPECT_NOERR(apm_->echo_control_mobile()->Enable(true)); | |
1819 | |
1820 EXPECT_NOERR(apm_->gain_control()->set_mode(GainControl::kAdaptiveDigital)); | |
1821 EXPECT_NOERR(apm_->gain_control()->Enable(true)); | |
1822 #elif defined(WEBRTC_AUDIOPROC_FLOAT_PROFILE) | |
1823 EXPECT_NOERR(apm_->echo_cancellation()->enable_drift_compensation(true)); | |
1824 EXPECT_NOERR(apm_->echo_cancellation()->enable_metrics(true)); | |
1825 EXPECT_NOERR(apm_->echo_cancellation()->enable_delay_logging(true)); | |
1826 EXPECT_NOERR(apm_->echo_cancellation()->Enable(true)); | |
1827 | |
1828 EXPECT_NOERR(apm_->gain_control()->set_mode(GainControl::kAdaptiveAnalog)); | |
1829 EXPECT_NOERR(apm_->gain_control()->set_analog_level_limits(0, 255)); | |
1830 EXPECT_NOERR(apm_->gain_control()->Enable(true)); | |
1831 #endif | |
1832 | |
1833 EXPECT_NOERR(apm_->high_pass_filter()->Enable(true)); | |
1834 EXPECT_NOERR(apm_->level_estimator()->Enable(true)); | |
1835 EXPECT_NOERR(apm_->noise_suppression()->Enable(true)); | |
1836 | |
1837 EXPECT_NOERR(apm_->voice_detection()->Enable(true)); | |
1817 ProcessDebugDump(in_filename, ref_filename, format); | 1838 ProcessDebugDump(in_filename, ref_filename, format); |
1839 | |
1840 // dsadadasaadasdfewafscdeeds | |
peah-webrtc
2015/10/02 08:34:27
This comment should be updated to be more proper :
minyue-webrtc
2015/10/02 09:01:42
sorry sorry, this is my local branch for testing t
| |
1841 #if defined(WEBRTC_AUDIOPROC_FIXED_PROFILE) | |
1842 EXPECT_NOERR(apm_->echo_control_mobile()->Enable(false)); | |
1843 | |
1844 EXPECT_NOERR(apm_->gain_control()->set_mode(GainControl::kAdaptiveDigital)); | |
1845 EXPECT_NOERR(apm_->gain_control()->Enable(false)); | |
1846 #elif defined(WEBRTC_AUDIOPROC_FLOAT_PROFILE) | |
1847 EXPECT_NOERR(apm_->echo_cancellation()->enable_drift_compensation(false)); | |
1848 EXPECT_NOERR(apm_->echo_cancellation()->enable_metrics(false)); | |
1849 EXPECT_NOERR(apm_->echo_cancellation()->enable_delay_logging(false)); | |
1850 EXPECT_NOERR(apm_->echo_cancellation()->Enable(false)); | |
1851 | |
1852 EXPECT_NOERR(apm_->gain_control()->set_mode(GainControl::kAdaptiveAnalog)); | |
1853 EXPECT_NOERR(apm_->gain_control()->set_analog_level_limits(0, 255)); | |
1854 EXPECT_NOERR(apm_->gain_control()->Enable(false)); | |
1855 #endif | |
1856 | |
1857 EXPECT_NOERR(apm_->high_pass_filter()->Enable(false)); | |
1858 EXPECT_NOERR(apm_->level_estimator()->Enable(false)); | |
1859 EXPECT_NOERR(apm_->noise_suppression()->Enable(false)); | |
1860 | |
1861 EXPECT_NOERR(apm_->voice_detection()->Enable(false)); | |
1818 ProcessDebugDump(ref_filename, out_filename, format); | 1862 ProcessDebugDump(ref_filename, out_filename, format); |
1819 | 1863 |
1820 FILE* ref_file = fopen(ref_filename.c_str(), "rb"); | 1864 FILE* ref_file = fopen(ref_filename.c_str(), "rb"); |
1821 FILE* out_file = fopen(out_filename.c_str(), "rb"); | 1865 FILE* out_file = fopen(out_filename.c_str(), "rb"); |
1822 ASSERT_TRUE(ref_file != NULL); | 1866 ASSERT_TRUE(ref_file != NULL); |
1823 ASSERT_TRUE(out_file != NULL); | 1867 ASSERT_TRUE(out_file != NULL); |
1824 rtc::scoped_ptr<uint8_t[]> ref_bytes; | 1868 rtc::scoped_ptr<uint8_t[]> ref_bytes; |
1825 rtc::scoped_ptr<uint8_t[]> out_bytes; | 1869 rtc::scoped_ptr<uint8_t[]> out_bytes; |
1826 | 1870 |
1827 size_t ref_size = ReadMessageBytesFromFile(ref_file, &ref_bytes); | 1871 size_t ref_size = ReadMessageBytesFromFile(ref_file, &ref_bytes); |
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2748 std::tr1::make_tuple(16000, 16000, 32000, 16000, 40, 20), | 2792 std::tr1::make_tuple(16000, 16000, 32000, 16000, 40, 20), |
2749 std::tr1::make_tuple(16000, 16000, 16000, 16000, 0, 0))); | 2793 std::tr1::make_tuple(16000, 16000, 16000, 16000, 0, 0))); |
2750 #endif | 2794 #endif |
2751 | 2795 |
2752 // TODO(henrike): re-implement functionality lost when removing the old main | 2796 // TODO(henrike): re-implement functionality lost when removing the old main |
2753 // function. See | 2797 // function. See |
2754 // https://code.google.com/p/webrtc/issues/detail?id=1981 | 2798 // https://code.google.com/p/webrtc/issues/detail?id=1981 |
2755 | 2799 |
2756 } // namespace | 2800 } // namespace |
2757 } // namespace webrtc | 2801 } // namespace webrtc |
OLD | NEW |