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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 rtp_info_)); | 146 rtp_info_)); |
147 } | 147 } |
148 | 148 |
149 // Pull audio equivalent to the amount of audio in one RTP packet. | 149 // Pull audio equivalent to the amount of audio in one RTP packet. |
150 void Pull() { | 150 void Pull() { |
151 AudioFrame frame; | 151 AudioFrame frame; |
152 for (int k = 0; k < kNum10msPerFrame; ++k) { // Pull one frame. | 152 for (int k = 0; k < kNum10msPerFrame; ++k) { // Pull one frame. |
153 ASSERT_EQ(0, acm_->PlayoutData10Ms(-1, &frame)); | 153 ASSERT_EQ(0, acm_->PlayoutData10Ms(-1, &frame)); |
154 // Had to use ASSERT_TRUE, ASSERT_EQ generated error. | 154 // Had to use ASSERT_TRUE, ASSERT_EQ generated error. |
155 ASSERT_TRUE(kSampleRateHz == frame.sample_rate_hz_); | 155 ASSERT_TRUE(kSampleRateHz == frame.sample_rate_hz_); |
156 ASSERT_EQ(1, frame.num_channels_); | 156 ASSERT_EQ(1u, frame.num_channels_); |
157 ASSERT_TRUE(kSampleRateHz / 100 == frame.samples_per_channel_); | 157 ASSERT_TRUE(kSampleRateHz / 100 == frame.samples_per_channel_); |
158 } | 158 } |
159 } | 159 } |
160 | 160 |
161 void Run(bool clean) { | 161 void Run(bool clean) { |
162 for (int n = 0; n < 10; ++n) { | 162 for (int n = 0; n < 10; ++n) { |
163 for (int m = 0; m < 5; ++m) { | 163 for (int m = 0; m < 5; ++m) { |
164 Push(); | 164 Push(); |
165 Pull(); | 165 Pull(); |
166 } | 166 } |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 #define MAYBE_TargetDelayBufferMinMax DISABLED_TargetDelayBufferMinMax | 240 #define MAYBE_TargetDelayBufferMinMax DISABLED_TargetDelayBufferMinMax |
241 #else | 241 #else |
242 #define MAYBE_TargetDelayBufferMinMax TargetDelayBufferMinMax | 242 #define MAYBE_TargetDelayBufferMinMax TargetDelayBufferMinMax |
243 #endif | 243 #endif |
244 TEST_F(TargetDelayTest, MAYBE_TargetDelayBufferMinMax) { | 244 TEST_F(TargetDelayTest, MAYBE_TargetDelayBufferMinMax) { |
245 TargetDelayBufferMinMax(); | 245 TargetDelayBufferMinMax(); |
246 } | 246 } |
247 | 247 |
248 } // namespace webrtc | 248 } // namespace webrtc |
249 | 249 |
OLD | NEW |