Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Side by Side Diff: webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.cc

Issue 2750783004: Add mute state field to AudioFrame. (Closed)
Patch Set: Update new usages of AudioFrame::data_ Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/tools/audio_sink.h ('k') | webrtc/modules/audio_coding/neteq/tools/neteq_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698