| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 AudioDecodingCallStats stats; | 242 AudioDecodingCallStats stats; |
| 243 acm_->GetDecodingCallStatistics(&stats); | 243 acm_->GetDecodingCallStatistics(&stats); |
| 244 EXPECT_EQ(0, stats.calls_to_neteq); | 244 EXPECT_EQ(0, stats.calls_to_neteq); |
| 245 EXPECT_EQ(0, stats.calls_to_silence_generator); | 245 EXPECT_EQ(0, stats.calls_to_silence_generator); |
| 246 EXPECT_EQ(0, stats.decoded_normal); | 246 EXPECT_EQ(0, stats.decoded_normal); |
| 247 EXPECT_EQ(0, stats.decoded_cng); | 247 EXPECT_EQ(0, stats.decoded_cng); |
| 248 EXPECT_EQ(0, stats.decoded_plc); | 248 EXPECT_EQ(0, stats.decoded_plc); |
| 249 EXPECT_EQ(0, stats.decoded_plc_cng); | 249 EXPECT_EQ(0, stats.decoded_plc_cng); |
| 250 } | 250 } |
| 251 | 251 |
| 252 // Apply an initial playout delay. Calls to AudioCodingModule::PlayoutData10ms() | |
| 253 // should result in generating silence, check the associated field. | |
| 254 TEST_F(AudioCodingModuleTestOldApi, | |
| 255 DISABLED_ON_ANDROID(SilenceGeneratorCalled)) { | |
| 256 RegisterCodec(); | |
| 257 AudioDecodingCallStats stats; | |
| 258 const int kInitialDelay = 100; | |
| 259 | |
| 260 acm_->SetInitialPlayoutDelay(kInitialDelay); | |
| 261 | |
| 262 int num_calls = 0; | |
| 263 for (int time_ms = 0; time_ms < kInitialDelay; | |
| 264 time_ms += kFrameSizeMs, ++num_calls) { | |
| 265 InsertPacketAndPullAudio(); | |
| 266 } | |
| 267 acm_->GetDecodingCallStatistics(&stats); | |
| 268 EXPECT_EQ(0, stats.calls_to_neteq); | |
| 269 EXPECT_EQ(num_calls, stats.calls_to_silence_generator); | |
| 270 EXPECT_EQ(0, stats.decoded_normal); | |
| 271 EXPECT_EQ(0, stats.decoded_cng); | |
| 272 EXPECT_EQ(0, stats.decoded_plc); | |
| 273 EXPECT_EQ(0, stats.decoded_plc_cng); | |
| 274 } | |
| 275 | |
| 276 // Insert some packets and pull audio. Check statistics are valid. Then, | 252 // Insert some packets and pull audio. Check statistics are valid. Then, |
| 277 // simulate packet loss and check if PLC and PLC-to-CNG statistics are | 253 // simulate packet loss and check if PLC and PLC-to-CNG statistics are |
| 278 // correctly updated. | 254 // correctly updated. |
| 279 TEST_F(AudioCodingModuleTestOldApi, DISABLED_ON_ANDROID(NetEqCalls)) { | 255 TEST_F(AudioCodingModuleTestOldApi, DISABLED_ON_ANDROID(NetEqCalls)) { |
| 280 RegisterCodec(); | 256 RegisterCodec(); |
| 281 AudioDecodingCallStats stats; | 257 AudioDecodingCallStats stats; |
| 282 const int kNumNormalCalls = 10; | 258 const int kNumNormalCalls = 10; |
| 283 | 259 |
| 284 for (int num_calls = 0; num_calls < kNumNormalCalls; ++num_calls) { | 260 for (int num_calls = 0; num_calls < kNumNormalCalls; ++num_calls) { |
| 285 InsertPacketAndPullAudio(); | 261 InsertPacketAndPullAudio(); |
| (...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1783 Run(16000, 8000, 1000); | 1759 Run(16000, 8000, 1000); |
| 1784 } | 1760 } |
| 1785 | 1761 |
| 1786 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { | 1762 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { |
| 1787 Run(8000, 16000, 1000); | 1763 Run(8000, 16000, 1000); |
| 1788 } | 1764 } |
| 1789 | 1765 |
| 1790 #endif | 1766 #endif |
| 1791 | 1767 |
| 1792 } // namespace webrtc | 1768 } // namespace webrtc |
| OLD | NEW |