OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 class DelayTest { | 63 class DelayTest { |
64 public: | 64 public: |
65 DelayTest() | 65 DelayTest() |
66 : acm_a_(AudioCodingModule::Create(0)), | 66 : acm_a_(AudioCodingModule::Create(0)), |
67 acm_b_(AudioCodingModule::Create(1)), | 67 acm_b_(AudioCodingModule::Create(1)), |
68 channel_a2b_(new Channel), | 68 channel_a2b_(new Channel), |
69 test_cntr_(0), | 69 test_cntr_(0), |
70 encoding_sample_rate_hz_(8000) {} | 70 encoding_sample_rate_hz_(8000) {} |
71 | 71 |
72 ~DelayTest() { | 72 ~DelayTest() { |
73 if (channel_a2b_ != NULL) { | 73 if (channel_a2b_ != nullptr) { |
74 delete channel_a2b_; | 74 delete channel_a2b_; |
75 channel_a2b_ = NULL; | 75 channel_a2b_ = nullptr; |
76 } | 76 } |
77 in_file_a_.Close(); | 77 in_file_a_.Close(); |
78 } | 78 } |
79 | 79 |
80 void Initialize() { | 80 void Initialize() { |
81 test_cntr_ = 0; | 81 test_cntr_ = 0; |
82 std::string file_name = webrtc::test::ResourcePath( | 82 std::string file_name = webrtc::test::ResourcePath( |
83 "audio_coding/testfile32kHz", "pcm"); | 83 "audio_coding/testfile32kHz", "pcm"); |
84 if (FLAGS_input_file.size() > 0) | 84 if (FLAGS_input_file.size() > 0) |
85 file_name = FLAGS_input_file; | 85 file_name = FLAGS_input_file; |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 test_setting.codec.num_channels = FLAGS_num_channels; | 260 test_setting.codec.num_channels = FLAGS_num_channels; |
261 test_setting.acm.dtx = FLAGS_dtx; | 261 test_setting.acm.dtx = FLAGS_dtx; |
262 test_setting.acm.fec = FLAGS_fec; | 262 test_setting.acm.fec = FLAGS_fec; |
263 test_setting.packet_loss = FLAGS_packet_loss; | 263 test_setting.packet_loss = FLAGS_packet_loss; |
264 | 264 |
265 webrtc::DelayTest delay_test; | 265 webrtc::DelayTest delay_test; |
266 delay_test.Initialize(); | 266 delay_test.Initialize(); |
267 delay_test.Perform(&test_setting, 1, 240, "delay_test"); | 267 delay_test.Perform(&test_setting, 1, 240, "delay_test"); |
268 return 0; | 268 return 0; |
269 } | 269 } |
OLD | NEW |