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

Side by Side Diff: webrtc/modules/audio_processing/test/audioproc_float.cc

Issue 1411423010: Fix TransientSuppression in audioproc_float (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebasing Created 5 years, 1 month 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 | « no previous file | 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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 rtc::scoped_ptr<AudioProcessing> ap(AudioProcessing::Create(config)); 106 rtc::scoped_ptr<AudioProcessing> ap(AudioProcessing::Create(config));
107 RTC_CHECK_EQ(kNoErr, ap->echo_cancellation()->Enable(FLAGS_aec || FLAGS_all)); 107 RTC_CHECK_EQ(kNoErr, ap->echo_cancellation()->Enable(FLAGS_aec || FLAGS_all));
108 RTC_CHECK_EQ(kNoErr, ap->gain_control()->Enable(FLAGS_agc || FLAGS_all)); 108 RTC_CHECK_EQ(kNoErr, ap->gain_control()->Enable(FLAGS_agc || FLAGS_all));
109 RTC_CHECK_EQ(kNoErr, ap->high_pass_filter()->Enable(FLAGS_hpf || FLAGS_all)); 109 RTC_CHECK_EQ(kNoErr, ap->high_pass_filter()->Enable(FLAGS_hpf || FLAGS_all));
110 RTC_CHECK_EQ(kNoErr, ap->noise_suppression()->Enable(FLAGS_ns || FLAGS_all)); 110 RTC_CHECK_EQ(kNoErr, ap->noise_suppression()->Enable(FLAGS_ns || FLAGS_all));
111 if (FLAGS_ns_level != -1) { 111 if (FLAGS_ns_level != -1) {
112 RTC_CHECK_EQ(kNoErr, 112 RTC_CHECK_EQ(kNoErr,
113 ap->noise_suppression()->set_level( 113 ap->noise_suppression()->set_level(
114 static_cast<NoiseSuppression::Level>(FLAGS_ns_level))); 114 static_cast<NoiseSuppression::Level>(FLAGS_ns_level)));
115 } 115 }
116 ap->set_stream_key_pressed(FLAGS_ts);
116 117
117 rtc::scoped_ptr<AudioFileProcessor> processor; 118 rtc::scoped_ptr<AudioFileProcessor> processor;
118 auto out_file = rtc_make_scoped_ptr( 119 auto out_file = rtc_make_scoped_ptr(
119 new WavWriter(FLAGS_o, FLAGS_out_sample_rate, FLAGS_out_channels)); 120 new WavWriter(FLAGS_o, FLAGS_out_sample_rate, FLAGS_out_channels));
120 std::cout << FLAGS_o << ": " << out_file->FormatAsString() << std::endl; 121 std::cout << FLAGS_o << ": " << out_file->FormatAsString() << std::endl;
121 if (FLAGS_dump.empty()) { 122 if (FLAGS_dump.empty()) {
122 auto in_file = rtc_make_scoped_ptr(new WavReader(FLAGS_i)); 123 auto in_file = rtc_make_scoped_ptr(new WavReader(FLAGS_i));
123 std::cout << FLAGS_i << ": " << in_file->FormatAsString() << std::endl; 124 std::cout << FLAGS_i << ": " << in_file->FormatAsString() << std::endl;
124 processor.reset( 125 processor.reset(
125 new WavFileProcessor(ap.Pass(), in_file.Pass(), out_file.Pass())); 126 new WavFileProcessor(ap.Pass(), in_file.Pass(), out_file.Pass()));
(...skipping 21 matching lines...) Expand all
147 } 148 }
148 149
149 return 0; 150 return 0;
150 } 151 }
151 152
152 } // namespace webrtc 153 } // namespace webrtc
153 154
154 int main(int argc, char* argv[]) { 155 int main(int argc, char* argv[]) {
155 return webrtc::main(argc, argv); 156 return webrtc::main(argc, argv);
156 } 157 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698