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