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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 EXPECT_FALSE(receiver_->vad_enabled()); | 285 EXPECT_FALSE(receiver_->vad_enabled()); |
286 | 286 |
287 for (int n = 0; n < kNumPackets; ++n) { | 287 for (int n = 0; n < kNumPackets; ++n) { |
288 InsertOnePacketOfSilence(id); | 288 InsertOnePacketOfSilence(id); |
289 for (int k = 0; k < num_10ms_frames; ++k) | 289 for (int k = 0; k < num_10ms_frames; ++k) |
290 ASSERT_EQ(0, receiver_->GetAudio(codecs_[id].plfreq, &frame)); | 290 ASSERT_EQ(0, receiver_->GetAudio(codecs_[id].plfreq, &frame)); |
291 } | 291 } |
292 EXPECT_EQ(AudioFrame::kVadUnknown, frame.vad_activity_); | 292 EXPECT_EQ(AudioFrame::kVadUnknown, frame.vad_activity_); |
293 } | 293 } |
294 | 294 |
295 TEST_F(AcmReceiverTestOldApi, DISABLED_ON_ANDROID(LastAudioCodec)) { | 295 #ifdef WEBRTC_CODEC_ISAC |
| 296 #define IF_ISAC_FLOAT(x) x |
| 297 #else |
| 298 #define IF_ISAC_FLOAT(x) DISABLED_##x |
| 299 #endif |
| 300 |
| 301 TEST_F(AcmReceiverTestOldApi, |
| 302 DISABLED_ON_ANDROID(IF_ISAC_FLOAT(LastAudioCodec))) { |
296 const int kCodecId[] = { | 303 const int kCodecId[] = { |
297 ACMCodecDB::kISAC, ACMCodecDB::kPCMA, ACMCodecDB::kISACSWB, | 304 ACMCodecDB::kISAC, ACMCodecDB::kPCMA, ACMCodecDB::kISACSWB, |
298 ACMCodecDB::kPCM16Bswb32kHz, | 305 ACMCodecDB::kPCM16Bswb32kHz, |
299 -1 // Terminator. | 306 -1 // Terminator. |
300 }; | 307 }; |
301 AddSetOfCodecs(kCodecId); | 308 AddSetOfCodecs(kCodecId); |
302 | 309 |
303 const int kCngId[] = { // Not including full-band. | 310 const int kCngId[] = { // Not including full-band. |
304 ACMCodecDB::kCNNB, ACMCodecDB::kCNWB, ACMCodecDB::kCNSWB, | 311 ACMCodecDB::kCNNB, ACMCodecDB::kCNWB, ACMCodecDB::kCNSWB, |
305 -1 // Terminator. | 312 -1 // Terminator. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 EXPECT_EQ(kCodecId[n], receiver_->last_audio_codec_id()); | 361 EXPECT_EQ(kCodecId[n], receiver_->last_audio_codec_id()); |
355 EXPECT_EQ(0, receiver_->LastAudioCodec(&codec)); | 362 EXPECT_EQ(0, receiver_->LastAudioCodec(&codec)); |
356 EXPECT_TRUE(CodecsEqual(codecs_[kCodecId[n]], codec)); | 363 EXPECT_TRUE(CodecsEqual(codecs_[kCodecId[n]], codec)); |
357 ++n; | 364 ++n; |
358 } | 365 } |
359 } | 366 } |
360 | 367 |
361 } // namespace acm2 | 368 } // namespace acm2 |
362 | 369 |
363 } // namespace webrtc | 370 } // namespace webrtc |
OLD | NEW |