OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 int ret = neteq_->GetAudio(&out_frame_, &muted); | 399 int ret = neteq_->GetAudio(&out_frame_, &muted); |
400 RTC_CHECK(!muted); | 400 RTC_CHECK(!muted); |
401 | 401 |
402 if (ret != NetEq::kOK) { | 402 if (ret != NetEq::kOK) { |
403 return -1; | 403 return -1; |
404 } else { | 404 } else { |
405 RTC_DCHECK_EQ(out_frame_.num_channels_, channels_); | 405 RTC_DCHECK_EQ(out_frame_.num_channels_, channels_); |
406 RTC_DCHECK_EQ(out_frame_.samples_per_channel_, | 406 RTC_DCHECK_EQ(out_frame_.samples_per_channel_, |
407 static_cast<size_t>(kOutputSizeMs * out_sampling_khz_)); | 407 static_cast<size_t>(kOutputSizeMs * out_sampling_khz_)); |
408 RTC_CHECK(output_->WriteArray( | 408 RTC_CHECK(output_->WriteArray( |
409 out_frame_.data_, | 409 out_frame_.data(), |
410 out_frame_.samples_per_channel_ * out_frame_.num_channels_)); | 410 out_frame_.samples_per_channel_ * out_frame_.num_channels_)); |
411 return static_cast<int>(out_frame_.samples_per_channel_); | 411 return static_cast<int>(out_frame_.samples_per_channel_); |
412 } | 412 } |
413 } | 413 } |
414 | 414 |
415 void NetEqQualityTest::Simulate() { | 415 void NetEqQualityTest::Simulate() { |
416 int audio_size_samples; | 416 int audio_size_samples; |
417 | 417 |
418 while (decoded_time_ms_ < FLAGS_runtime_ms) { | 418 while (decoded_time_ms_ < FLAGS_runtime_ms) { |
419 // Assume 10 packets in packets buffer. | 419 // Assume 10 packets in packets buffer. |
(...skipping 12 matching lines...) Expand all Loading... |
432 } | 432 } |
433 } | 433 } |
434 Log() << "Average bit rate was " | 434 Log() << "Average bit rate was " |
435 << 8.0f * total_payload_size_bytes_ / FLAGS_runtime_ms | 435 << 8.0f * total_payload_size_bytes_ / FLAGS_runtime_ms |
436 << " kbps" | 436 << " kbps" |
437 << std::endl; | 437 << std::endl; |
438 } | 438 } |
439 | 439 |
440 } // namespace test | 440 } // namespace test |
441 } // namespace webrtc | 441 } // namespace webrtc |
OLD | NEW |