| OLD | NEW | 
|     1 /* |     1 /* | 
|     2  *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |     2  *  Copyright (c) 2011 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   336  |   336  | 
|   337 void NetEqDecodingTest::Process(int* out_len) { |   337 void NetEqDecodingTest::Process(int* out_len) { | 
|   338   // Check if time to receive. |   338   // Check if time to receive. | 
|   339   while (packet_ && sim_clock_ >= packet_->time_ms()) { |   339   while (packet_ && sim_clock_ >= packet_->time_ms()) { | 
|   340     if (packet_->payload_length_bytes() > 0) { |   340     if (packet_->payload_length_bytes() > 0) { | 
|   341       WebRtcRTPHeader rtp_header; |   341       WebRtcRTPHeader rtp_header; | 
|   342       packet_->ConvertHeader(&rtp_header); |   342       packet_->ConvertHeader(&rtp_header); | 
|   343       ASSERT_EQ(0, neteq_->InsertPacket( |   343       ASSERT_EQ(0, neteq_->InsertPacket( | 
|   344                        rtp_header, packet_->payload(), |   344                        rtp_header, packet_->payload(), | 
|   345                        packet_->payload_length_bytes(), |   345                        packet_->payload_length_bytes(), | 
|   346                        packet_->time_ms() * (output_sample_rate_ / 1000))); |   346                        static_cast<uint32_t>( | 
 |   347                            packet_->time_ms() * (output_sample_rate_ / 1000)))); | 
|   347     } |   348     } | 
|   348     // Get next packet. |   349     // Get next packet. | 
|   349     packet_.reset(rtp_source_->NextPacket()); |   350     packet_.reset(rtp_source_->NextPacket()); | 
|   350   } |   351   } | 
|   351  |   352  | 
|   352   // Get audio from NetEq. |   353   // Get audio from NetEq. | 
|   353   NetEqOutputType type; |   354   NetEqOutputType type; | 
|   354   int num_channels; |   355   int num_channels; | 
|   355   ASSERT_EQ(0, neteq_->GetAudio(kMaxBlockSize, out_data_, out_len, |   356   ASSERT_EQ(0, neteq_->GetAudio(kMaxBlockSize, out_data_, out_len, | 
|   356                                 &num_channels, &type)); |   357                                 &num_channels, &type)); | 
| (...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1534     // Pull audio once. |  1535     // Pull audio once. | 
|  1535     ASSERT_EQ(0, neteq_->GetAudio(kMaxBlockSize, out_data_, &out_len, |  1536     ASSERT_EQ(0, neteq_->GetAudio(kMaxBlockSize, out_data_, &out_len, | 
|  1536                                   &num_channels, &type)); |  1537                                   &num_channels, &type)); | 
|  1537     ASSERT_EQ(kBlockSize16kHz, out_len); |  1538     ASSERT_EQ(kBlockSize16kHz, out_len); | 
|  1538   } |  1539   } | 
|  1539   // Verify speech output. |  1540   // Verify speech output. | 
|  1540   EXPECT_EQ(kOutputNormal, type); |  1541   EXPECT_EQ(kOutputNormal, type); | 
|  1541 } |  1542 } | 
|  1542  |  1543  | 
|  1543 }  // namespace webrtc |  1544 }  // namespace webrtc | 
| OLD | NEW |