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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // Get audio from mono instance. | 214 // Get audio from mono instance. |
215 EXPECT_EQ(NetEq::kOK, neteq_mono_->GetAudio(&output_)); | 215 bool muted; |
| 216 EXPECT_EQ(NetEq::kOK, neteq_mono_->GetAudio(&output_, &muted)); |
| 217 ASSERT_FALSE(muted); |
216 EXPECT_EQ(1u, output_.num_channels_); | 218 EXPECT_EQ(1u, output_.num_channels_); |
217 EXPECT_EQ(output_size_samples_, output_.samples_per_channel_); | 219 EXPECT_EQ(output_size_samples_, output_.samples_per_channel_); |
218 // Get audio from multi-channel instance. | 220 // Get audio from multi-channel instance. |
219 ASSERT_EQ(NetEq::kOK, neteq_->GetAudio(&output_multi_channel_)); | 221 ASSERT_EQ(NetEq::kOK, neteq_->GetAudio(&output_multi_channel_, &muted)); |
| 222 ASSERT_FALSE(muted); |
220 EXPECT_EQ(num_channels_, output_multi_channel_.num_channels_); | 223 EXPECT_EQ(num_channels_, output_multi_channel_.num_channels_); |
221 EXPECT_EQ(output_size_samples_, | 224 EXPECT_EQ(output_size_samples_, |
222 output_multi_channel_.samples_per_channel_); | 225 output_multi_channel_.samples_per_channel_); |
223 std::ostringstream ss; | 226 std::ostringstream ss; |
224 ss << "Lap number " << k << "."; | 227 ss << "Lap number " << k << "."; |
225 SCOPED_TRACE(ss.str()); // Print out the parameter values on failure. | 228 SCOPED_TRACE(ss.str()); // Print out the parameter values on failure. |
226 // Compare mono and multi-channel. | 229 // Compare mono and multi-channel. |
227 ASSERT_NO_FATAL_FAILURE(VerifyOutput(output_size_samples_)); | 230 ASSERT_NO_FATAL_FAILURE(VerifyOutput(output_size_samples_)); |
228 | 231 |
229 time_now += kTimeStepMs; | 232 time_now += kTimeStepMs; |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 | 424 |
422 INSTANTIATE_TEST_CASE_P(MultiChannel, | 425 INSTANTIATE_TEST_CASE_P(MultiChannel, |
423 NetEqStereoTestDelays, | 426 NetEqStereoTestDelays, |
424 ::testing::ValuesIn(GetTestParameters())); | 427 ::testing::ValuesIn(GetTestParameters())); |
425 | 428 |
426 INSTANTIATE_TEST_CASE_P(MultiChannel, | 429 INSTANTIATE_TEST_CASE_P(MultiChannel, |
427 NetEqStereoTestLosses, | 430 NetEqStereoTestLosses, |
428 ::testing::ValuesIn(GetTestParameters())); | 431 ::testing::ValuesIn(GetTestParameters())); |
429 | 432 |
430 } // namespace webrtc | 433 } // namespace webrtc |
OLD | NEW |