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

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: Changes in response to latest reviewer comments 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 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 if (tick_diff.Microseconds() < min_time_reverse_us) { 701 if (tick_diff.Microseconds() < min_time_reverse_us) {
702 min_time_reverse_us = tick_diff.Microseconds(); 702 min_time_reverse_us = tick_diff.Microseconds();
703 } 703 }
704 } 704 }
705 705
706 } else if (event_msg.type() == Event::STREAM) { 706 } else if (event_msg.type() == Event::STREAM) {
707 ASSERT_TRUE(event_msg.has_stream()); 707 ASSERT_TRUE(event_msg.has_stream());
708 const Stream msg = event_msg.stream(); 708 const Stream msg = event_msg.stream();
709 primary_count++; 709 primary_count++;
710 710
711 // ProcessStream could have changed this for the output frame.
712 near_frame.num_channels_ = apm->num_input_channels();
713
714 ASSERT_TRUE(msg.has_input_data() ^ (msg.input_channel_size() > 0)); 711 ASSERT_TRUE(msg.has_input_data() ^ (msg.input_channel_size() > 0));
715 if (msg.has_input_data()) { 712 if (msg.has_input_data()) {
716 ASSERT_EQ(sizeof(int16_t) * samples_per_channel * 713 ASSERT_EQ(sizeof(int16_t) * samples_per_channel *
717 near_frame.num_channels_, msg.input_data().size()); 714 near_frame.num_channels_, msg.input_data().size());
718 memcpy(near_frame.data_, 715 memcpy(near_frame.data_,
719 msg.input_data().data(), 716 msg.input_data().data(),
720 msg.input_data().size()); 717 msg.input_data().size());
721 near_read_bytes += msg.input_data().size(); 718 near_read_bytes += msg.input_data().size();
722 } else { 719 } else {
723 for (int i = 0; i < msg.input_channel_size(); ++i) { 720 for (int i = 0; i < msg.input_channel_size(); ++i) {
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 } // namespace 1147 } // namespace
1151 } // namespace webrtc 1148 } // namespace webrtc
1152 1149
1153 int main(int argc, char* argv[]) { 1150 int main(int argc, char* argv[]) {
1154 webrtc::void_main(argc, argv); 1151 webrtc::void_main(argc, argv);
1155 1152
1156 // Optional, but removes memory leak noise from Valgrind. 1153 // Optional, but removes memory leak noise from Valgrind.
1157 google::protobuf::ShutdownProtobufLibrary(); 1154 google::protobuf::ShutdownProtobufLibrary();
1158 return 0; 1155 return 0;
1159 } 1156 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698