| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 182 |
| 183 void SetUp() override { | 183 void SetUp() override { |
| 184 ASSERT_EQ(NetEq::kOK, | 184 ASSERT_EQ(NetEq::kOK, |
| 185 neteq_internal_->RegisterPayloadType(kDecoderPCM16Bswb32kHz, | 185 neteq_internal_->RegisterPayloadType(kDecoderPCM16Bswb32kHz, |
| 186 kPayloadType)); | 186 kPayloadType)); |
| 187 } | 187 } |
| 188 | 188 |
| 189 void GetAndVerifyOutput() override { | 189 void GetAndVerifyOutput() override { |
| 190 NetEqOutputType output_type; | 190 NetEqOutputType output_type; |
| 191 size_t samples_per_channel; | 191 size_t samples_per_channel; |
| 192 int num_channels; | 192 size_t num_channels; |
| 193 // Get audio from internal decoder instance. | 193 // Get audio from internal decoder instance. |
| 194 EXPECT_EQ(NetEq::kOK, | 194 EXPECT_EQ(NetEq::kOK, |
| 195 neteq_internal_->GetAudio(kMaxBlockSize, | 195 neteq_internal_->GetAudio(kMaxBlockSize, |
| 196 output_internal_, | 196 output_internal_, |
| 197 &samples_per_channel, | 197 &samples_per_channel, |
| 198 &num_channels, | 198 &num_channels, |
| 199 &output_type)); | 199 &output_type)); |
| 200 EXPECT_EQ(1, num_channels); | 200 EXPECT_EQ(1u, num_channels); |
| 201 EXPECT_EQ(static_cast<size_t>(kOutputLengthMs * sample_rate_hz_ / 1000), | 201 EXPECT_EQ(static_cast<size_t>(kOutputLengthMs * sample_rate_hz_ / 1000), |
| 202 samples_per_channel); | 202 samples_per_channel); |
| 203 | 203 |
| 204 // Get audio from external decoder instance. | 204 // Get audio from external decoder instance. |
| 205 samples_per_channel = GetOutputAudio(kMaxBlockSize, output_, &output_type); | 205 samples_per_channel = GetOutputAudio(kMaxBlockSize, output_, &output_type); |
| 206 | 206 |
| 207 for (size_t i = 0; i < samples_per_channel; ++i) { | 207 for (size_t i = 0; i < samples_per_channel; ++i) { |
| 208 ASSERT_EQ(output_[i], output_internal_[i]) << | 208 ASSERT_EQ(output_[i], output_internal_[i]) << |
| 209 "Diff in sample " << i << "."; | 209 "Diff in sample " << i << "."; |
| 210 } | 210 } |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 kStartSeqeunceNumber, | 454 kStartSeqeunceNumber, |
| 455 kStartTimestamp, | 455 kStartTimestamp, |
| 456 kJumpFromTimestamp, | 456 kJumpFromTimestamp, |
| 457 kJumpToTimestamp)); | 457 kJumpToTimestamp)); |
| 458 | 458 |
| 459 RunTest(130); // Run 130 laps @ 10 ms each in the test loop. | 459 RunTest(130); // Run 130 laps @ 10 ms each in the test loop. |
| 460 EXPECT_EQ(kRecovered, test_state_); | 460 EXPECT_EQ(kRecovered, test_state_); |
| 461 } | 461 } |
| 462 | 462 |
| 463 } // namespace webrtc | 463 } // namespace webrtc |
| OLD | NEW |