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 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
833 while (simulating || feof(event_file) == 0) { | 833 while (simulating || feof(event_file) == 0) { |
834 std::ostringstream trace_stream; | 834 std::ostringstream trace_stream; |
835 trace_stream << "Processed frames: " << reverse_count << " (reverse), " | 835 trace_stream << "Processed frames: " << reverse_count << " (reverse), " |
836 << primary_count << " (primary)"; | 836 << primary_count << " (primary)"; |
837 SCOPED_TRACE(trace_stream.str()); | 837 SCOPED_TRACE(trace_stream.str()); |
838 | 838 |
839 if (simulating) { | 839 if (simulating) { |
840 if (far_file == NULL) { | 840 if (far_file == NULL) { |
841 event = kCaptureEvent; | 841 event = kCaptureEvent; |
842 } else { | 842 } else { |
843 if (event == kRenderEvent) { | 843 event = (event == kCaptureEvent) ? kRenderEvent : kCaptureEvent; |
844 event = kCaptureEvent; | |
845 } else { | |
846 event = kRenderEvent; | |
847 } | |
848 } | 844 } |
849 } else { | 845 } else { |
850 read_count = fread(&event, sizeof(event), 1, event_file); | 846 read_count = fread(&event, sizeof(event), 1, event_file); |
851 if (read_count != 1) { | 847 if (read_count != 1) { |
852 break; | 848 break; |
853 } | 849 } |
854 } | 850 } |
855 | 851 |
856 far_frame.sample_rate_hz_ = sample_rate_hz; | 852 far_frame.sample_rate_hz_ = sample_rate_hz; |
857 far_frame.samples_per_channel_ = samples_per_channel; | 853 far_frame.samples_per_channel_ = samples_per_channel; |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1146 } // namespace | 1142 } // namespace |
1147 } // namespace webrtc | 1143 } // namespace webrtc |
1148 | 1144 |
1149 int main(int argc, char* argv[]) { | 1145 int main(int argc, char* argv[]) { |
1150 webrtc::void_main(argc, argv); | 1146 webrtc::void_main(argc, argv); |
1151 | 1147 |
1152 // Optional, but removes memory leak noise from Valgrind. | 1148 // Optional, but removes memory leak noise from Valgrind. |
1153 google::protobuf::ShutdownProtobufLibrary(); | 1149 google::protobuf::ShutdownProtobufLibrary(); |
1154 return 0; | 1150 return 0; |
1155 } | 1151 } |
OLD | NEW |