| 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 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 class TargetDelayTest : public ::testing::Test { | 24 class TargetDelayTest : public ::testing::Test { |
| 25 protected: | 25 protected: |
| 26 TargetDelayTest() : acm_(AudioCodingModule::Create(0)) {} | 26 TargetDelayTest() : acm_(AudioCodingModule::Create(0)) {} |
| 27 | 27 |
| 28 ~TargetDelayTest() {} | 28 ~TargetDelayTest() {} |
| 29 | 29 |
| 30 void SetUp() { | 30 void SetUp() { |
| 31 EXPECT_TRUE(acm_.get() != NULL); | 31 EXPECT_TRUE(acm_.get() != NULL); |
| 32 | 32 |
| 33 CodecInst codec; | |
| 34 ASSERT_EQ(0, AudioCodingModule::Codec("L16", &codec, kSampleRateHz, 1)); | |
| 35 ASSERT_EQ(0, acm_->InitializeReceiver()); | 33 ASSERT_EQ(0, acm_->InitializeReceiver()); |
| 36 ASSERT_EQ(0, acm_->RegisterReceiveCodec(codec)); | 34 constexpr int pltype = 108; |
| 35 ASSERT_EQ(true, |
| 36 acm_->RegisterReceiveCodec(pltype, {"L16", kSampleRateHz, 1})); |
| 37 | 37 |
| 38 rtp_info_.header.payloadType = codec.pltype; | 38 rtp_info_.header.payloadType = pltype; |
| 39 rtp_info_.header.timestamp = 0; | 39 rtp_info_.header.timestamp = 0; |
| 40 rtp_info_.header.ssrc = 0x12345678; | 40 rtp_info_.header.ssrc = 0x12345678; |
| 41 rtp_info_.header.markerBit = false; | 41 rtp_info_.header.markerBit = false; |
| 42 rtp_info_.header.sequenceNumber = 0; | 42 rtp_info_.header.sequenceNumber = 0; |
| 43 rtp_info_.type.Audio.channel = 1; | 43 rtp_info_.type.Audio.channel = 1; |
| 44 rtp_info_.type.Audio.isCNG = false; | 44 rtp_info_.type.Audio.isCNG = false; |
| 45 rtp_info_.frameType = kAudioFrameSpeech; | 45 rtp_info_.frameType = kAudioFrameSpeech; |
| 46 | 46 |
| 47 int16_t audio[kFrameSizeSamples]; | 47 int16_t audio[kFrameSizeSamples]; |
| 48 const int kRange = 0x7FF; // 2047, easy for masking. | 48 const int kRange = 0x7FF; // 2047, easy for masking. |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 #define MAYBE_TargetDelayBufferMinMax DISABLED_TargetDelayBufferMinMax | 243 #define MAYBE_TargetDelayBufferMinMax DISABLED_TargetDelayBufferMinMax |
| 244 #else | 244 #else |
| 245 #define MAYBE_TargetDelayBufferMinMax TargetDelayBufferMinMax | 245 #define MAYBE_TargetDelayBufferMinMax TargetDelayBufferMinMax |
| 246 #endif | 246 #endif |
| 247 TEST_F(TargetDelayTest, MAYBE_TargetDelayBufferMinMax) { | 247 TEST_F(TargetDelayTest, MAYBE_TargetDelayBufferMinMax) { |
| 248 TargetDelayBufferMinMax(); | 248 TargetDelayBufferMinMax(); |
| 249 } | 249 } |
| 250 | 250 |
| 251 } // namespace webrtc | 251 } // namespace webrtc |
| 252 | 252 |
| OLD | NEW |