| 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 | 183 |
| 184 void SetUp() override { | 184 void SetUp() override { |
| 185 ASSERT_EQ(NetEq::kOK, neteq_internal_->RegisterPayloadType( | 185 ASSERT_EQ(NetEq::kOK, neteq_internal_->RegisterPayloadType( |
| 186 NetEqDecoder::kDecoderPCM16Bswb32kHz, | 186 NetEqDecoder::kDecoderPCM16Bswb32kHz, |
| 187 "pcm16-swb32", kPayloadType)); | 187 "pcm16-swb32", kPayloadType)); |
| 188 } | 188 } |
| 189 | 189 |
| 190 void GetAndVerifyOutput() override { | 190 void GetAndVerifyOutput() override { |
| 191 // Get audio from internal decoder instance. | 191 // Get audio from internal decoder instance. |
| 192 EXPECT_EQ(NetEq::kOK, neteq_internal_->GetAudio(&output_internal_)); | 192 bool muted; |
| 193 EXPECT_EQ(NetEq::kOK, neteq_internal_->GetAudio(&output_internal_, &muted)); |
| 194 ASSERT_FALSE(muted); |
| 193 EXPECT_EQ(1u, output_internal_.num_channels_); | 195 EXPECT_EQ(1u, output_internal_.num_channels_); |
| 194 EXPECT_EQ(static_cast<size_t>(kOutputLengthMs * sample_rate_hz_ / 1000), | 196 EXPECT_EQ(static_cast<size_t>(kOutputLengthMs * sample_rate_hz_ / 1000), |
| 195 output_internal_.samples_per_channel_); | 197 output_internal_.samples_per_channel_); |
| 196 | 198 |
| 197 // Get audio from external decoder instance. | 199 // Get audio from external decoder instance. |
| 198 GetOutputAudio(&output_); | 200 GetOutputAudio(&output_); |
| 199 | 201 |
| 200 for (size_t i = 0; i < output_.samples_per_channel_; ++i) { | 202 for (size_t i = 0; i < output_.samples_per_channel_; ++i) { |
| 201 ASSERT_EQ(output_.data_[i], output_internal_.data_[i]) | 203 ASSERT_EQ(output_.data_[i], output_internal_.data_[i]) |
| 202 << "Diff in sample " << i << "."; | 204 << "Diff in sample " << i << "."; |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 kStartSeqeunceNumber, | 443 kStartSeqeunceNumber, |
| 442 kStartTimestamp, | 444 kStartTimestamp, |
| 443 kJumpFromTimestamp, | 445 kJumpFromTimestamp, |
| 444 kJumpToTimestamp)); | 446 kJumpToTimestamp)); |
| 445 | 447 |
| 446 RunTest(130); // Run 130 laps @ 10 ms each in the test loop. | 448 RunTest(130); // Run 130 laps @ 10 ms each in the test loop. |
| 447 EXPECT_EQ(kRecovered, test_state_); | 449 EXPECT_EQ(kRecovered, test_state_); |
| 448 } | 450 } |
| 449 | 451 |
| 450 } // namespace webrtc | 452 } // namespace webrtc |
| OLD | NEW |