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

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

Issue 1907223003: Extension and refactoring of the audioproc_f tool to be a fully fledged tool for audio processing m… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase with latest master Created 4 years, 7 months 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
OLDNEW
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 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 if (diff_us < min_time_reverse_us) { 702 if (diff_us < min_time_reverse_us) {
703 min_time_reverse_us = diff_us; 703 min_time_reverse_us = diff_us;
704 } 704 }
705 } 705 }
706 706
707 } else if (event_msg.type() == Event::STREAM) { 707 } else if (event_msg.type() == Event::STREAM) {
708 ASSERT_TRUE(event_msg.has_stream()); 708 ASSERT_TRUE(event_msg.has_stream());
709 const Stream msg = event_msg.stream(); 709 const Stream msg = event_msg.stream();
710 primary_count++; 710 primary_count++;
711 711
712 // ProcessStream could have changed this for the output frame.
713 near_frame.num_channels_ = apm->num_input_channels();
714
715 ASSERT_TRUE(msg.has_input_data() ^ (msg.input_channel_size() > 0)); 712 ASSERT_TRUE(msg.has_input_data() ^ (msg.input_channel_size() > 0));
716 if (msg.has_input_data()) { 713 if (msg.has_input_data()) {
717 ASSERT_EQ(sizeof(int16_t) * samples_per_channel * 714 ASSERT_EQ(sizeof(int16_t) * samples_per_channel *
718 near_frame.num_channels_, msg.input_data().size()); 715 near_frame.num_channels_, msg.input_data().size());
719 memcpy(near_frame.data_, 716 memcpy(near_frame.data_,
720 msg.input_data().data(), 717 msg.input_data().data(),
721 msg.input_data().size()); 718 msg.input_data().size());
722 near_read_bytes += msg.input_data().size(); 719 near_read_bytes += msg.input_data().size();
723 } else { 720 } else {
724 for (int i = 0; i < msg.input_channel_size(); ++i) { 721 for (int i = 0; i < msg.input_channel_size(); ++i) {
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 } // namespace 1151 } // namespace
1155 } // namespace webrtc 1152 } // namespace webrtc
1156 1153
1157 int main(int argc, char* argv[]) { 1154 int main(int argc, char* argv[]) {
1158 webrtc::void_main(argc, argv); 1155 webrtc::void_main(argc, argv);
1159 1156
1160 // Optional, but removes memory leak noise from Valgrind. 1157 // Optional, but removes memory leak noise from Valgrind.
1161 google::protobuf::ShutdownProtobufLibrary(); 1158 google::protobuf::ShutdownProtobufLibrary();
1162 return 0; 1159 return 0;
1163 } 1160 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698