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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 rtp_info_)); | 147 rtp_info_)); |
148 } | 148 } |
149 | 149 |
150 // Pull audio equivalent to the amount of audio in one RTP packet. | 150 // Pull audio equivalent to the amount of audio in one RTP packet. |
151 void Pull() { | 151 void Pull() { |
152 AudioFrame frame; | 152 AudioFrame frame; |
153 for (int k = 0; k < kNum10msPerFrame; ++k) { // Pull one frame. | 153 for (int k = 0; k < kNum10msPerFrame; ++k) { // Pull one frame. |
154 ASSERT_EQ(0, acm_->PlayoutData10Ms(-1, &frame)); | 154 ASSERT_EQ(0, acm_->PlayoutData10Ms(-1, &frame)); |
155 // Had to use ASSERT_TRUE, ASSERT_EQ generated error. | 155 // Had to use ASSERT_TRUE, ASSERT_EQ generated error. |
156 ASSERT_TRUE(kSampleRateHz == frame.sample_rate_hz_); | 156 ASSERT_TRUE(kSampleRateHz == frame.sample_rate_hz_); |
157 ASSERT_EQ(1, frame.num_channels_); | 157 ASSERT_EQ(1u, frame.num_channels_); |
158 ASSERT_TRUE(kSampleRateHz / 100 == frame.samples_per_channel_); | 158 ASSERT_TRUE(kSampleRateHz / 100 == frame.samples_per_channel_); |
159 } | 159 } |
160 } | 160 } |
161 | 161 |
162 void Run(bool clean) { | 162 void Run(bool clean) { |
163 for (int n = 0; n < 10; ++n) { | 163 for (int n = 0; n < 10; ++n) { |
164 for (int m = 0; m < 5; ++m) { | 164 for (int m = 0; m < 5; ++m) { |
165 Push(); | 165 Push(); |
166 Pull(); | 166 Pull(); |
167 } | 167 } |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 TEST_F(TargetDelayTest, DISABLED_ON_ANDROID(RequiredDelayAtCorrectRange)) { | 214 TEST_F(TargetDelayTest, DISABLED_ON_ANDROID(RequiredDelayAtCorrectRange)) { |
215 RequiredDelayAtCorrectRange(); | 215 RequiredDelayAtCorrectRange(); |
216 } | 216 } |
217 | 217 |
218 TEST_F(TargetDelayTest, DISABLED_ON_ANDROID(TargetDelayBufferMinMax)) { | 218 TEST_F(TargetDelayTest, DISABLED_ON_ANDROID(TargetDelayBufferMinMax)) { |
219 TargetDelayBufferMinMax(); | 219 TargetDelayBufferMinMax(); |
220 } | 220 } |
221 | 221 |
222 } // namespace webrtc | 222 } // namespace webrtc |
223 | 223 |
OLD | NEW |