| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 encoded_multi_channel_, | 204 encoded_multi_channel_, |
| 205 multi_payload_size_bytes_), | 205 multi_payload_size_bytes_), |
| 206 next_arrival_time)); | 206 next_arrival_time)); |
| 207 // Get next input packets (mono and multi-channel). | 207 // Get next input packets (mono and multi-channel). |
| 208 do { | 208 do { |
| 209 next_send_time = GetNewPackets(); | 209 next_send_time = GetNewPackets(); |
| 210 ASSERT_NE(-1, next_send_time); | 210 ASSERT_NE(-1, next_send_time); |
| 211 next_arrival_time = GetArrivalTime(next_send_time); | 211 next_arrival_time = GetArrivalTime(next_send_time); |
| 212 } while (Lost()); // If lost, immediately read the next packet. | 212 } while (Lost()); // If lost, immediately read the next packet. |
| 213 } | 213 } |
| 214 NetEqOutputType output_type; | |
| 215 // Get audio from mono instance. | 214 // Get audio from mono instance. |
| 216 EXPECT_EQ(NetEq::kOK, neteq_mono_->GetAudio(&output_, &output_type)); | 215 EXPECT_EQ(NetEq::kOK, neteq_mono_->GetAudio(&output_)); |
| 217 EXPECT_EQ(1u, output_.num_channels_); | 216 EXPECT_EQ(1u, output_.num_channels_); |
| 218 EXPECT_EQ(output_size_samples_, output_.samples_per_channel_); | 217 EXPECT_EQ(output_size_samples_, output_.samples_per_channel_); |
| 219 // Get audio from multi-channel instance. | 218 // Get audio from multi-channel instance. |
| 220 ASSERT_EQ(NetEq::kOK, | 219 ASSERT_EQ(NetEq::kOK, neteq_->GetAudio(&output_multi_channel_)); |
| 221 neteq_->GetAudio(&output_multi_channel_, &output_type)); | |
| 222 EXPECT_EQ(num_channels_, output_multi_channel_.num_channels_); | 220 EXPECT_EQ(num_channels_, output_multi_channel_.num_channels_); |
| 223 EXPECT_EQ(output_size_samples_, | 221 EXPECT_EQ(output_size_samples_, |
| 224 output_multi_channel_.samples_per_channel_); | 222 output_multi_channel_.samples_per_channel_); |
| 225 std::ostringstream ss; | 223 std::ostringstream ss; |
| 226 ss << "Lap number " << k << "."; | 224 ss << "Lap number " << k << "."; |
| 227 SCOPED_TRACE(ss.str()); // Print out the parameter values on failure. | 225 SCOPED_TRACE(ss.str()); // Print out the parameter values on failure. |
| 228 // Compare mono and multi-channel. | 226 // Compare mono and multi-channel. |
| 229 ASSERT_NO_FATAL_FAILURE(VerifyOutput(output_size_samples_)); | 227 ASSERT_NO_FATAL_FAILURE(VerifyOutput(output_size_samples_)); |
| 230 | 228 |
| 231 time_now += kTimeStepMs; | 229 time_now += kTimeStepMs; |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 | 421 |
| 424 INSTANTIATE_TEST_CASE_P(MultiChannel, | 422 INSTANTIATE_TEST_CASE_P(MultiChannel, |
| 425 NetEqStereoTestDelays, | 423 NetEqStereoTestDelays, |
| 426 ::testing::ValuesIn(GetTestParameters())); | 424 ::testing::ValuesIn(GetTestParameters())); |
| 427 | 425 |
| 428 INSTANTIATE_TEST_CASE_P(MultiChannel, | 426 INSTANTIATE_TEST_CASE_P(MultiChannel, |
| 429 NetEqStereoTestLosses, | 427 NetEqStereoTestLosses, |
| 430 ::testing::ValuesIn(GetTestParameters())); | 428 ::testing::ValuesIn(GetTestParameters())); |
| 431 | 429 |
| 432 } // namespace webrtc | 430 } // namespace webrtc |
| OLD | NEW |