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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 EXPECT_EQ(kNumPlc, stats.decoded_plc); | 284 EXPECT_EQ(kNumPlc, stats.decoded_plc); |
285 EXPECT_EQ(kNumPlcCng, stats.decoded_plc_cng); | 285 EXPECT_EQ(kNumPlcCng, stats.decoded_plc_cng); |
286 } | 286 } |
287 | 287 |
288 TEST_F(AudioCodingModuleTestOldApi, VerifyOutputFrame) { | 288 TEST_F(AudioCodingModuleTestOldApi, VerifyOutputFrame) { |
289 AudioFrame audio_frame; | 289 AudioFrame audio_frame; |
290 const int kSampleRateHz = 32000; | 290 const int kSampleRateHz = 32000; |
291 EXPECT_EQ(0, acm_->PlayoutData10Ms(kSampleRateHz, &audio_frame)); | 291 EXPECT_EQ(0, acm_->PlayoutData10Ms(kSampleRateHz, &audio_frame)); |
292 EXPECT_EQ(id_, audio_frame.id_); | 292 EXPECT_EQ(id_, audio_frame.id_); |
293 EXPECT_EQ(0u, audio_frame.timestamp_); | 293 EXPECT_EQ(0u, audio_frame.timestamp_); |
294 EXPECT_GT(audio_frame.num_channels_, 0); | 294 EXPECT_GT(audio_frame.num_channels_, 0u); |
295 EXPECT_EQ(static_cast<size_t>(kSampleRateHz / 100), | 295 EXPECT_EQ(static_cast<size_t>(kSampleRateHz / 100), |
296 audio_frame.samples_per_channel_); | 296 audio_frame.samples_per_channel_); |
297 EXPECT_EQ(kSampleRateHz, audio_frame.sample_rate_hz_); | 297 EXPECT_EQ(kSampleRateHz, audio_frame.sample_rate_hz_); |
298 } | 298 } |
299 | 299 |
300 TEST_F(AudioCodingModuleTestOldApi, FailOnZeroDesiredFrequency) { | 300 TEST_F(AudioCodingModuleTestOldApi, FailOnZeroDesiredFrequency) { |
301 AudioFrame audio_frame; | 301 AudioFrame audio_frame; |
302 EXPECT_EQ(-1, acm_->PlayoutData10Ms(0, &audio_frame)); | 302 EXPECT_EQ(-1, acm_->PlayoutData10Ms(0, &audio_frame)); |
303 } | 303 } |
304 | 304 |
(...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1747 Run(16000, 8000, 1000); | 1747 Run(16000, 8000, 1000); |
1748 } | 1748 } |
1749 | 1749 |
1750 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { | 1750 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { |
1751 Run(8000, 16000, 1000); | 1751 Run(8000, 16000, 1000); |
1752 } | 1752 } |
1753 | 1753 |
1754 #endif | 1754 #endif |
1755 | 1755 |
1756 } // namespace webrtc | 1756 } // namespace webrtc |
OLD | NEW |